You are here

public static function SerializationInterface::encode in Plug 7

Encodes data into the serialization format.

Parameters

mixed $data: The data to encode.

Return value

string The encoded data.

3 methods override SerializationInterface::encode()
Json::encode in lib/Drupal/Component/Serialization/Json.php
Uses HTML-safe strings, with several characters escaped.
PhpSerialize::encode in lib/Drupal/Component/Serialization/PhpSerialize.php
Encodes data into the serialization format.
Yaml::encode in lib/Drupal/Component/Serialization/Yaml.php
Encodes data into the serialization format.

File

lib/Drupal/Component/Serialization/SerializationInterface.php, line 24
Contains \Drupal\Component\Serialization\SerializationInterface.

Class

SerializationInterface
Defines an interface for serialization formats.

Namespace

Drupal\Component\Serialization

Code

public static function encode($data);