PHP 클래스 Mongolid\Serializer\Serializer

It's a bug present in 1.1 version and should be fixed in version 1.2, so, this class can be deleted after upgrade our dependency of 1.1 version of MongoDB driver
또한 보기: https://jira.mongodb.org/browse/PHPC-460
파일 보기 프로젝트 열기: leroy-merlin-br/mongolid 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$converter Mongolid\Serializer\Type\Converter

공개 메소드들

메소드 설명
__construct ( Converter $converter ) Constructor.
convert ( array $attributes ) : array Converts recursively the given objects (probably retrieved from MongoDB) to our specific types.
serialize ( array $attributes ) : string Walk into an array to get not serializable objects and replace it by a serializable one.
unconvert ( array $attributes ) : array Unconverts recursively the given objects to persistable objects on MongoDB Example: converts Type\ObjectID to MongoDB\BSON\ObjectID.
unserialize ( string $data ) : array Unserializes the given string and turn it back to specific objects.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( Converter $converter )
$converter Mongolid\Serializer\Type\Converter Class responsible to convert objects.

convert() 공개 메소드

Example: converts MongoDB\BSON\ObjectID to Type\ObjectID.
public convert ( array $attributes ) : array
$attributes array Array to convert.
리턴 array

serialize() 공개 메소드

Walk into an array to get not serializable objects and replace it by a serializable one.
public serialize ( array $attributes ) : string
$attributes array ActiveRecord attributes to be serialized.
리턴 string

unconvert() 공개 메소드

Unconverts recursively the given objects to persistable objects on MongoDB Example: converts Type\ObjectID to MongoDB\BSON\ObjectID.
public unconvert ( array $attributes ) : array
$attributes array Array to convert.
리턴 array

unserialize() 공개 메소드

Unserializes the given string and turn it back to specific objects.
public unserialize ( string $data ) : array
$data string Serialized string to be converted.
리턴 array

프로퍼티 상세

$converter 보호되어 있는 프로퍼티

protected Converter,Mongolid\Serializer\Type $converter
리턴 Mongolid\Serializer\Type\Converter