interface SerializationInterface in Plug 7
Defines an interface for serialization formats.
Hierarchy
- interface \Drupal\Component\Serialization\SerializationInterface
Expanded class hierarchy of SerializationInterface
All classes that implement SerializationInterface
File
- lib/
Drupal/ Component/ Serialization/ SerializationInterface.php, line 13 - Contains \Drupal\Component\Serialization\SerializationInterface.
Namespace
Drupal\Component\SerializationView source
interface SerializationInterface {
/**
* Encodes data into the serialization format.
*
* @param mixed $data
* The data to encode.
*
* @return string
* The encoded data.
*/
public static function encode($data);
/**
* Decodes data from the serialization format.
*
* @param string $raw
* The raw data string to decode.
*
* @return mixed
* The decoded data.
*/
public static function decode($raw);
/**
* Gets the file extension for this serialization format.
*
* @return string
* The file extension, without leading dot.
*/
public static function getFileExtension();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SerializationInterface:: |
public static | function | Decodes data from the serialization format. | 3 |
SerializationInterface:: |
public static | function | Encodes data into the serialization format. | 3 |
SerializationInterface:: |
public static | function | Gets the file extension for this serialization format. | 3 |