PHP Class Mongolid\Serializer\Type\Converter

Afficher le fichier Open project: leroy-merlin-br/mongolid Class Usage Examples

Protected Properties

Свойство Type Description
$mappedTypes string[]

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
getReflectionClass ( mixed $className ) : mixed Returns the mapped type of the given className.

Method Details

__construct() public méthode

Constructor.
public __construct ( )

getReflectionClass() protected méthode

Returns the mapped type of the given className.
protected getReflectionClass ( mixed $className ) : mixed
$className mixed Name of the class to return.
Résultat mixed

toDomainTypes() public méthode

Example: converts MongoDB\BSON\ObjectID to Type\ObjectID
public toDomainTypes ( array $data ) : mixed
$data array Array to convert.
Résultat mixed

toMongoTypes() public méthode

Example: converts Type\ObjectID to MongoDB\BSON\ObjectID.
public toMongoTypes ( array $data ) : mixed
$data array Array to convert.
Résultat mixed

Property Details

$mappedTypes protected_oe property

protected string[] $mappedTypes
Résultat string[]