PHP Класс PhpOrient\Protocols\Binary\Serialization\CSV

Показать файл Открыть проект Примеры использования класса

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

Метод Описание
serialize ( mixed $value, boolean $embedded = false ) : string Serialize a value.
unserialize ( string $input ) : array | null Deserialize a record.

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

Метод Описание
eatArray ( string $input ) : array Consume an array of values.
eatBag ( string $input ) : array Consume a record id bag.
eatBinary ( string $input ) : array Consume a binary field.
eatFirstKey ( string $input ) : array Consume the first field key, which could be a class name.
eatKey ( string $input ) : array Consume a field key, which may or may not be quoted.
eatMap ( string $input ) : array Consume a map of keys to values.
eatNumber ( string $input ) : array Consume a number.
eatRID ( string $input ) : array Consume a Record ID.
eatRecord ( string $input ) : array Consume an embedded record.
eatSet ( string $input ) : array Consume a set of values.
eatString ( string $input ) : array Consume a string.
eatValue ( string $input ) : array Consume a field value.
serializeArray ( array $array ) : string Serialize an array of values.
serializeDocument ( PhpOrient\Protocols\Binary\Abstracts\SerializableInterface $document, $embedded = false )

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

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

Consume an array of values.
protected static eatArray ( string $input ) : array
$input string The input to consume
Результат array The collected array and any remaining content.

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

Consume a record id bag.
protected static eatBag ( string $input ) : array
$input string The input to consume
Результат array The collected record id bag and any remaining content.

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

Consume a binary field.
protected static eatBinary ( string $input ) : array
$input string The input to consume
Результат array The collected binary and any remaining content.

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

Consume the first field key, which could be a class name.
protected static eatFirstKey ( string $input ) : array
$input string The input to consume
Результат array The collected string and any remaining content, followed by a boolean indicating whether this is a class name.

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

Consume a field key, which may or may not be quoted.
protected static eatKey ( string $input ) : array
$input string The input to consume
Результат array The collected string and any remaining content.

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

Consume a map of keys to values.
protected static eatMap ( string $input ) : array
$input string The input to consume
Результат array The collected map and any remaining content.

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

If the number has a suffix, consume it also and instantiate the right type, e.g. for dates
protected static eatNumber ( string $input ) : array
$input string The input to consume
Результат array The collected number and any remaining content.

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

Consume a Record ID.
protected static eatRID ( string $input ) : array
$input string The input to consume
Результат array The collected RID and any remaining content.

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

Consume an embedded record.
protected static eatRecord ( string $input ) : array
$input string The input to unserialize.
Результат array The collected record and any remaining content.

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

Consume a set of values.
protected static eatSet ( string $input ) : array
$input string The input to consume
Результат array The collected set and any remaining content.

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

Consume a string.
protected static eatString ( string $input ) : array
$input string The input to consume
Результат array The collected string and any remaining content.

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

Consume a field value.
protected static eatValue ( string $input ) : array
$input string The input to consume
Результат array The collected value and any remaining content.

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

Serialize a value.
public static serialize ( mixed $value, boolean $embedded = false ) : string
$value mixed The value to serialize.
$embedded boolean Whether this is a value embedded in another.
Результат string The serialized value.

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

If the array is associative a map will be returned, otherwise a plain array.
protected static serializeArray ( array $array ) : string
$array array the array to serialize
Результат string the serialized array or map.

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

protected static serializeDocument ( PhpOrient\Protocols\Binary\Abstracts\SerializableInterface $document, $embedded = false )
$document PhpOrient\Protocols\Binary\Abstracts\SerializableInterface

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

Deserialize a record.
public static unserialize ( string $input ) : array | null
$input string The input to un-serialize.
Результат array | null The un-serialized document, or null if the input is empty.