PHP Class Doctrine\ODM\OrientDB\Mapper\Hydration\Hydrator

Author: Alessandro Nadalin ([email protected])
Author: David Funaro ([email protected])
Author: Tamás Millián ([email protected])
Afficher le fichier Open project: doctrine/orientdb-odm Class Usage Examples

Protected Properties

Свойство Type Description
$binding
$cache
$castedProperties
$caster
$clusterMap
$enableMismatchesTolerance
$inflector
$metadataFactory
$proxyFactory
$uow

Méthodes publiques

Méthode Description
__construct ( UnitOfWork $uow )
enableMismatchesTolerance ( boolean $tolerate ) Sets whether the Hydrator should tolerate mismatches during hydration.
hydrate ( stdClass $orientObject, Doctrine\ODM\OrientDB\Proxy\Proxy $proxy = null ) : Result Takes an Doctrine\OrientDB JSON object and finds the class responsible to map that object.
hydrateCollection ( array $collection ) : Doctrine\ODM\OrientDB\Collections\ArrayCollection Hydrates an array of documents.
hydrateRid ( Rid $rid )
load ( array $rids, string $fetchPlan = null ) : mixed
toleratesMismatches ( ) : boolean Checks whether the Hydrator throws exceptions or not when encountering an mismatch error during hydration.

Méthodes protégées

Méthode Description
castProperty ( Property $annotation, mixed $propertyValue ) : mixed Casts a value according to how it was annotated.
createDocument ( string $class, stdClass $orientObject ) : object Either tries to get the proxy
fill ( object $document, stdClass $object ) : object Given an object and an Orient-object, it fills the former with the latter.
getCache ( ) : Doctrine\Common\Cache\Cache Returns the caching layer of the mapper.
getCastedPropertyCacheKey ( $type, $value )
getCaster ( ) : Caster Returns the caster instance.
getMetadataFactory ( ) : ClassMetadataFactory Returns the MetadataFactor.
getProxyFactory ( ) : ProxyFactory Returns the ProxyFactory to which the hydrator is attached.
getUnitOfWork ( )
hydrateValue ( $value, Property $annotation ) : mixed | null Hydrates the value
verifyCastingSupport ( Caster $caster, string $method, string $annotationType ) Verifies if the given $caster supports casting with $method.

Method Details

__construct() public méthode

public __construct ( UnitOfWork $uow )
$uow Doctrine\ODM\OrientDB\UnitOfWork

castProperty() protected méthode

Casts a value according to how it was annotated.
protected castProperty ( Property $annotation, mixed $propertyValue ) : mixed
$annotation Doctrine\ODM\OrientDB\Mapper\Annotations\Property
$propertyValue mixed
Résultat mixed

createDocument() protected méthode

Either tries to get the proxy
protected createDocument ( string $class, stdClass $orientObject ) : object
$class string
$orientObject stdClass
Résultat object of type $class

enableMismatchesTolerance() public méthode

Sets whether the Hydrator should tolerate mismatches during hydration.
public enableMismatchesTolerance ( boolean $tolerate )
$tolerate boolean

fill() protected méthode

Given an object and an Orient-object, it fills the former with the latter.
protected fill ( object $document, stdClass $object ) : object
$document object
$object stdClass
Résultat object

getCache() protected méthode

Returns the caching layer of the mapper.
protected getCache ( ) : Doctrine\Common\Cache\Cache
Résultat Doctrine\Common\Cache\Cache

getCastedPropertyCacheKey() protected méthode

protected getCastedPropertyCacheKey ( $type, $value )

getCaster() protected méthode

Returns the caster instance.
protected getCaster ( ) : Caster
Résultat Doctrine\ODM\OrientDB\Caster\Caster

getMetadataFactory() protected méthode

Returns the MetadataFactor.
protected getMetadataFactory ( ) : ClassMetadataFactory
Résultat Doctrine\ODM\OrientDB\Mapper\ClassMetadataFactory

getProxyFactory() protected méthode

Returns the ProxyFactory to which the hydrator is attached.
protected getProxyFactory ( ) : ProxyFactory
Résultat Doctrine\ODM\OrientDB\Proxy\ProxyFactory

getUnitOfWork() protected méthode

protected getUnitOfWork ( )

hydrate() public méthode

If the class is found, a new POPO is instantiated and the properties inside the JSON object are filled accordingly.
public hydrate ( stdClass $orientObject, Doctrine\ODM\OrientDB\Proxy\Proxy $proxy = null ) : Result
$orientObject stdClass
$proxy Doctrine\ODM\OrientDB\Proxy\Proxy
Résultat Result

hydrateCollection() public méthode

Hydrates an array of documents.
public hydrateCollection ( array $collection ) : Doctrine\ODM\OrientDB\Collections\ArrayCollection
$collection array
Résultat Doctrine\ODM\OrientDB\Collections\ArrayCollection

hydrateRid() public méthode

public hydrateRid ( Rid $rid )
$rid Doctrine\ODM\OrientDB\Types\Rid

hydrateValue() protected méthode

Hydrates the value
protected hydrateValue ( $value, Property $annotation ) : mixed | null
$value
$annotation Doctrine\ODM\OrientDB\Mapper\Annotations\Property
Résultat mixed | null

load() public méthode

public load ( array $rids, string $fetchPlan = null ) : mixed
$rids array
$fetchPlan string
Résultat mixed

toleratesMismatches() public méthode

Checks whether the Hydrator throws exceptions or not when encountering an mismatch error during hydration.
public toleratesMismatches ( ) : boolean
Résultat boolean

verifyCastingSupport() protected méthode

If not, an exception is raised.
protected verifyCastingSupport ( Caster $caster, string $method, string $annotationType )
$caster Doctrine\ODM\OrientDB\Caster\Caster
$method string
$annotationType string

Property Details

$binding protected_oe property

protected $binding

$cache protected_oe property

protected $cache

$castedProperties protected_oe property

protected $castedProperties

$caster protected_oe property

protected $caster

$clusterMap protected_oe property

protected $clusterMap

$enableMismatchesTolerance protected_oe property

protected $enableMismatchesTolerance

$inflector protected_oe property

protected $inflector

$metadataFactory protected_oe property

protected $metadataFactory

$proxyFactory protected_oe property

protected $proxyFactory

$uow protected_oe property

protected $uow