You are here

PhpSerialize.php in Zircon Profile 8

Same filename and directory in other branches
  1. 8.0 core/lib/Drupal/Component/Serialization/PhpSerialize.php

File

core/lib/Drupal/Component/Serialization/PhpSerialize.php
View source
<?php

/**
 * @file
 * Contains \Drupal\Component\Serialization\PhpSerialize.
 */
namespace Drupal\Component\Serialization;


/**
 * Default serialization for serialized PHP.
 */
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';
  }

}

Classes

Namesort descending Description
PhpSerialize Default serialization for serialized PHP.