PHP Class Blast\Orm\Hydrator\EntityHydrator

Inheritance: implements Blast\Orm\Hydrator\HydratorInterface
Mostrar archivo Open project: phpthinktank/blast-orm

Public Methods

Method Description
__construct ( Blast\Orm\Entity\ProviderInterface $provider )
extract ( ) : array Extract values from given object
hydrate ( array $data = [], string $option = self::HYDRATE_AUTO ) : mixed
isCollectable ( $data ) : mixed

Protected Methods

Method Description
addRelationsToData ( $data, $entity ) : mixed Add relations to data
camelizeKeys ( $data ) : array Convert keys to camel case
determineOption ( $data, $option ) : string
getArraySerizableHydrator ( ) : Zend\Hydrator\ArraySerializable
getClassMethodsHydrator ( ) : Zend\Hydrator\ClassMethods
getObjectPropertyHydrator ( ) : Zend\Hydrator\ObjectProperty
hydrateCollection ( $data ) : object | SplStack
hydrateEntity ( $data ) : array | ArrayObject | object | stdClass Hydrates data to an entity
underscorizeKeys ( $data ) : array Convert keys to underscore

Method Details

__construct() public method

public __construct ( Blast\Orm\Entity\ProviderInterface $provider )
$provider Blast\Orm\Entity\ProviderInterface

addRelationsToData() protected method

Add relations to data
protected addRelationsToData ( $data, $entity ) : mixed
$data
$entity
return mixed

camelizeKeys() protected method

Convert keys to camel case
protected camelizeKeys ( $data ) : array
$data
return array

determineOption() protected method

protected determineOption ( $data, $option ) : string
$data
$option
return string

extract() public method

Extract values from given object
public extract ( ) : array
return array

getArraySerizableHydrator() protected method

protected getArraySerizableHydrator ( ) : Zend\Hydrator\ArraySerializable
return Zend\Hydrator\ArraySerializable

getClassMethodsHydrator() protected method

protected getClassMethodsHydrator ( ) : Zend\Hydrator\ClassMethods
return Zend\Hydrator\ClassMethods

getObjectPropertyHydrator() protected method

protected getObjectPropertyHydrator ( ) : Zend\Hydrator\ObjectProperty
return Zend\Hydrator\ObjectProperty

hydrate() public method

public hydrate ( array $data = [], string $option = self::HYDRATE_AUTO ) : mixed
$data array
$option string
return mixed

hydrateCollection() protected method

protected hydrateCollection ( $data ) : object | SplStack
$data
return object | SplStack

hydrateEntity() protected method

Hydrates data to an entity
protected hydrateEntity ( $data ) : array | ArrayObject | object | stdClass
$data
return array | ArrayObject | object | stdClass

isCollectable() public method

public isCollectable ( $data ) : mixed
$data
return mixed

underscorizeKeys() protected method

Convert keys to underscore
protected underscorizeKeys ( $data ) : array
$data
return array