PHP Класс Mongolid\Serializer\Type\Converter

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

Защищенные свойства (Protected)

Свойство Тип Описание
$mappedTypes string[]

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

Метод Описание
__construct ( ) Constructor.
toDomainTypes ( array $data ) : mixed Unconverts recursively the given objects (probably retrieved from MongoDB) to our specific types.
toMongoTypes ( array $data ) : mixed Converts recursively the given data to persistable objects into database.

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

Метод Описание
getReflectionClass ( mixed $className ) : mixed Returns the mapped type of the given className.

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

__construct() публичный Метод

Constructor.
public __construct ( )

getReflectionClass() защищенный Метод

Returns the mapped type of the given className.
protected getReflectionClass ( mixed $className ) : mixed
$className mixed Name of the class to return.
Результат mixed

toDomainTypes() публичный Метод

Example: converts MongoDB\BSON\ObjectID to Type\ObjectID
public toDomainTypes ( array $data ) : mixed
$data array Array to convert.
Результат mixed

toMongoTypes() публичный Метод

Example: converts Type\ObjectID to MongoDB\BSON\ObjectID.
public toMongoTypes ( array $data ) : mixed
$data array Array to convert.
Результат mixed

Описание свойств

$mappedTypes защищенное свойство

protected string[] $mappedTypes
Результат string[]