PHP Класс Horde_Serialize, horde

Copyright 2001-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Автор: Stephane Huther ([email protected])
Автор: Michael Slusarz ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
hasCapability ( integer $mode ) : boolean Check whether or not a serialization method is supported.
serialize ( mixed $data, mixed $mode = [self::BASIC], mixed $params = null ) : string Serialize a value.
unserialize ( mixed $data, mixed $mode = self::BASIC, mixed $params = null ) : string Unserialize a value.

Защищенные методы

Метод Описание
_serialize ( mixed $data, mixed $mode, mixed $params = null ) : string Serialize data.
_unserialize ( mixed &$data, mixed $mode, mixed $params = null ) : mixed Unserialize data.

Описание методов

_serialize() защищенный статический Метод

Serialize data.
protected static _serialize ( mixed $data, mixed $mode, mixed $params = null ) : string
$data mixed The data to be serialized.
$mode mixed The mode of serialization. Can be either a single mode or array of modes. If array, will be serialized in the order provided.
$params mixed Any additional parameters the serialization method requires.
Результат string A serialized string.

_unserialize() защищенный статический Метод

Unserialize data.
protected static _unserialize ( mixed &$data, mixed $mode, mixed $params = null ) : mixed
$data mixed The data to be unserialized.
$mode mixed The mode of unserialization. Can be either a single mode or array of modes. If array, will be unserialized in the order provided.
$params mixed Any additional parameters the unserialization method requires.
Результат mixed Unserialized data.

hasCapability() публичный статический Метод

Check whether or not a serialization method is supported.
public static hasCapability ( integer $mode ) : boolean
$mode integer The serialization method.
Результат boolean True if supported, false if not.

serialize() публичный статический Метод

See the list of constants at the top of the file for the serializing techniques that can be used.
public static serialize ( mixed $data, mixed $mode = [self::BASIC], mixed $params = null ) : string
$data mixed The data to be serialized.
$mode mixed The mode of serialization. Can be either a single mode or array of modes. If array, will be serialized in the order provided.
$params mixed Any additional parameters the serialization method requires.
Результат string The serialized data.

unserialize() публичный статический Метод

See the list of constants at the top of the file for the serializing techniques that can be used.
public static unserialize ( mixed $data, mixed $mode = self::BASIC, mixed $params = null ) : string
$data mixed The data to be unserialized.
$mode mixed The mode of unserialization. Can be either a single mode or array of modes. If array, will be unserialized in the order provided.
$params mixed Any additional parameters the unserialization method requires.
Результат string The unserialized data.