class PhpSerialize

Same name in other branches
  1. 9 core/lib/Drupal/Component/Serialization/PhpSerialize.php \Drupal\Component\Serialization\PhpSerialize
  2. 8.9.x core/lib/Drupal/Component/Serialization/PhpSerialize.php \Drupal\Component\Serialization\PhpSerialize
  3. 10 core/lib/Drupal/Component/Serialization/PhpSerialize.php \Drupal\Component\Serialization\PhpSerialize

Default serialization for serialized PHP.

Hierarchy

Expanded class hierarchy of PhpSerialize

4 files declare their use of PhpSerialize
DatabaseBackendFactoryTest.php in core/tests/Drupal/Tests/Core/Cache/DatabaseBackendFactoryTest.php
DrupalKernel.php in core/lib/Drupal/Core/DrupalKernel.php
EndOfTransactionQueriesTest.php in core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php
GarbageCollectionTest.php in core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php

File

core/lib/Drupal/Component/Serialization/PhpSerialize.php, line 8

Namespace

Drupal\Component\Serialization
View source
class PhpSerialize implements ObjectAwareSerializationInterface {
    
    /**
     * {@inheritdoc}
     */
    public static function encode($data) {
        return serialize($data);
    }
    
    /**
     * {@inheritdoc}
     */
    public static function decode($raw) {
        return unserialize($raw);
    }
    
    /**
     * {@inheritdoc}
     */
    public static function getFileExtension() {
        return 'serialized';
    }

}

Members

Title Sort descending Modifiers Object type Summary
PhpSerialize::decode public static function
PhpSerialize::encode public static function
PhpSerialize::getFileExtension public static function

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.