__construct()
addFilter()
addStrategy()
extract()
extractValue()
getFilter()
getStrategy()
hasFilter()
hasStrategy()
hydrate()
hydrateValue()
removeFilter()
removeStrategy()
$filterComposite
$strategies
__construct()
addFilter(string $name, \Zend\Stdlib\Hydrator\callable | \Zend\Stdlib\Hydrator\Filter\FilterInterface $filter, int $condition) : \Zend\Stdlib\Hydrator\Filter\FilterComposite
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
);
string
Index in the composite
\Zend\Stdlib\Hydrator\callable\Zend\Stdlib\Hydrator\Filter\FilterInterface
int
addStrategy(string $name, \Zend\Stdlib\Hydrator\Strategy\StrategyInterface $strategy) : \Zend\Stdlib\Hydrator\HydratorInterface
string
The name of the strategy to register.
extract(object $object) : array
inherited_from | \Zend\Stdlib\Hydrator\HydratorInterface::extract() |
---|
object
array
extractValue(string $name, mixed $value, array $object) : mixed
If no strategy exists the plain value is returned.
string
The name of the strategy to use.
mixed
The value that should be converted.
array
The object is optionally provided as context.
mixed
getFilter() : \Zend\Stdlib\Hydrator\Filter\FilterComposite
getStrategy(string $name) : \Zend\Stdlib\Hydrator\Strategy\StrategyInterface
string
The name of the strategy to get.
hasFilter(string $name) : bool
string
Index in the composite
bool
hasStrategy(string $name) : bool
string
The name of the strategy to check for.
bool
hydrate(array $data, object $object) : object
inherited_from | \Zend\Stdlib\Hydrator\HydratorInterface::hydrate() |
---|
array
object
object
hydrateValue(string $name, mixed $value, array $data) : mixed
If no strategy exists the plain value is returned.
string
The name of the strategy to use.
mixed
The value that should be converted.
array
The whole data is optionally provided as context.
mixed
removeFilter($name) : \Zend\Stdlib\Hydrator\Filter\FilterComposite
To not extract "has" methods, you simply need to unregister it
$filterComposite->removeFilter('has');
removeStrategy(string $name) : \Zend\Stdlib\Hydrator\HydratorInterface
string
The name of the strategy to remove.
$filterComposite : \Zend\Stdlib\Hydrator\Filter\FilterComposite