You are here

class PhpSerialize in Service Container 7.2

Same name and namespace in other branches
  1. 7 lib/Drupal/Component/Serialization/PhpSerialize.php \Drupal\Component\Serialization\PhpSerialize

Default serialization for serialized PHP.

Hierarchy

Expanded class hierarchy of PhpSerialize

File

lib/Drupal/Component/Serialization/PhpSerialize.php, line 13
Contains \Drupal\Component\Serialization\PhpSerialize.

Namespace

Drupal\Component\Serialization
View source
class PhpSerialize implements SerializationInterface {

  /**
   * {@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

Namesort descending Modifiers Type Description Overrides
PhpSerialize::decode public static function Decodes data from the serialization format. Overrides SerializationInterface::decode
PhpSerialize::encode public static function Encodes data into the serialization format. Overrides SerializationInterface::encode
PhpSerialize::getFileExtension public static function Gets the file extension for this serialization format. Overrides SerializationInterface::getFileExtension