Methods
Initializes a new instance of this class.
__construct()
Inherited
inherited_from |
\Zend\Stdlib\Hydrator\AbstractHydrator::__construct() |
Add a new filter to take care of what needs to be hydrated.
addFilter(string $name, \Zend\Stdlib\Hydrator\callable | \Zend\Stdlib\Hydrator\Filter\FilterInterface $filter, int $condition) : \Zend\Stdlib\Hydrator\Filter\FilterComposite
Inherited
To exclude e.g. the method getServiceLocator:
$composite->addFilter("servicelocator",
function($property) {
list($class, $method) = explode('::', $property);
if ($method === 'getServiceLocator') {
return false;
}
return true;
}, FilterComposite::CONDITION_AND
);
inherited_from |
\Zend\Stdlib\Hydrator\AbstractHydrator::addFilter() |
Parameters
$name
string
Index in the composite
$condition
int
Returns
Adds the given strategy under the given name.
addStrategy(string $name, \Zend\Stdlib\Hydrator\Strategy\StrategyInterface $strategy) : \Zend\Stdlib\Hydrator\HydratorInterface
Inherited
inherited_from |
\Zend\Stdlib\Hydrator\AbstractHydrator::addStrategy() |
Parameters
$name
string
The name of the strategy to register.
Returns
Gets the strategy with the given name.
getStrategy(string $name) : \Zend\Stdlib\Hydrator\Strategy\StrategyInterface
Inherited
inherited_from |
\Zend\Stdlib\Hydrator\AbstractHydrator::getStrategy() |
Parameters
$name
string
The name of the strategy to get.
Returns
Check whether a specific filter exists at key $name or not
hasFilter(string $name) : bool
Inherited
inherited_from |
\Zend\Stdlib\Hydrator\AbstractHydrator::hasFilter() |
Parameters
$name
string
Index in the composite
Returns
bool
Checks if the strategy with the given name exists.
hasStrategy(string $name) : bool
Inherited
inherited_from |
\Zend\Stdlib\Hydrator\AbstractHydrator::hasStrategy() |
Parameters
$name
string
The name of the strategy to check for.
Returns
bool
Hydrate $object with the provided $data.
hydrate(array $data, object $object) : object
Parameters
$data
array
$object
object
Returns
object
Converts a value for hydration.
hydrateValue(string $name, mixed $value) : mixed
Inherited
If no strategy exists the plain value is returned.
inherited_from |
\Zend\Stdlib\Hydrator\AbstractHydrator::hydrateValue() |
Parameters
$name
string
The name of the strategy to use.
$value
mixed
The value that should be converted.
Returns
mixed
Remove a filter from the composition.
removeFilter($name) : \Zend\Stdlib\Hydrator\Filter\FilterComposite
Inherited
To not extract "has" methods, you simply need to unregister it
$filterComposite->removeFilter('has');
inherited_from |
\Zend\Stdlib\Hydrator\AbstractHydrator::removeFilter() |
Parameters
$name
Returns
Removes the strategy with the given name.
removeStrategy(string $name) : \Zend\Stdlib\Hydrator\HydratorInterface
Inherited
inherited_from |
\Zend\Stdlib\Hydrator\AbstractHydrator::removeStrategy() |
Parameters
$name
string
The name of the strategy to remove.
Returns
Get a reflection properties from in-memory cache and lazy-load if
class has not been loaded.
getReflProperties(string | object $input) : array
Parameters
$input
stringobject
Exceptions
Returns
array
Properties
Simple in-memory array cache of ReflectionProperties used.
$reflProperties : array
The list with strategies that this hydrator has.
$strategies : \ArrayObject
Inherited
inherited_from |
\Zend\Stdlib\Hydrator\AbstractHydrator::$$strategies |