This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
drupalcampbristol/core/lib/Drupal/Component/Serialization/PhpSerialize.php

37 lines
556 B
PHP
Raw Normal View History

<?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';
}
}