Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176
This commit is contained in:
commit
9921556621
13277 changed files with 1459781 additions and 0 deletions
36
core/lib/Drupal/Component/Serialization/PhpSerialize.php
Normal file
36
core/lib/Drupal/Component/Serialization/PhpSerialize.php
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?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';
|
||||
}
|
||||
|
||||
}
|
Reference in a new issue