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])
Datei anzeigen Open project: doctrine/orientdb-odm Class Usage Examples

Protected Properties

Property Type Description
$binding
$cache
$castedProperties
$caster
$clusterMap
$enableMismatchesTolerance
$inflector
$metadataFactory
$proxyFactory
$uow

Public Methods

Method 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.

Protected Methods

Method 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 method

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

castProperty() protected method

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
return mixed

createDocument() protected method

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

enableMismatchesTolerance() public method

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

fill() protected method

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
return object

getCache() protected method

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

getCastedPropertyCacheKey() protected method

protected getCastedPropertyCacheKey ( $type, $value )

getCaster() protected method

Returns the caster instance.
protected getCaster ( ) : Caster
return Doctrine\ODM\OrientDB\Caster\Caster

getMetadataFactory() protected method

Returns the MetadataFactor.
protected getMetadataFactory ( ) : ClassMetadataFactory
return Doctrine\ODM\OrientDB\Mapper\ClassMetadataFactory

getProxyFactory() protected method

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

getUnitOfWork() protected method

protected getUnitOfWork ( )

hydrate() public method

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
return Result

hydrateCollection() public method

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

hydrateRid() public method

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

hydrateValue() protected method

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

load() public method

public load ( array $rids, string $fetchPlan = null ) : mixed
$rids array
$fetchPlan string
return mixed

toleratesMismatches() public method

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

verifyCastingSupport() protected method

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