__construct()
addFilter()
addStrategy()
extractName()
extractValue()
getFilter()
getNamingStrategy()
getStrategy()
hasFilter()
hasNamingStrategy()
hasStrategy()
hydrateName()
hydrateValue()
removeFilter()
removeNamingStrategy()
removeStrategy()
setNamingStrategy()
$filterComposite
$namingStrategy
$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
);
stringIndex 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
stringThe name of the strategy to register.
extractName(string $name, null $object) : mixed
If no naming strategy exists, the plain value is returned.
stringThe name to convert.
nullThe object is optionally provided as context.
mixedextractValue(string $name, mixed $value, mixed $object) : mixed
If no strategy exists the plain value is returned.
stringThe name of the strategy to use.
mixedThe value that should be converted.
mixedThe object is optionally provided as context.
mixedgetFilter() : \Zend\Stdlib\Hydrator\Filter\FilterComposite
getNamingStrategy() : \Zend\Stdlib\Hydrator\NamingStrategy\NamingStrategyInterface
getStrategy(string $name) : \Zend\Stdlib\Hydrator\Strategy\StrategyInterface
stringThe name of the strategy to get.
\Zend\Stdlib\Exception\InvalidArgumentException |
|---|
hasFilter(string $name) : bool
stringIndex in the composite
boolhasNamingStrategy() : bool
boolhasStrategy(string $name) : bool
stringThe name of the strategy to check for.
boolhydrateName(string $name, array $data) : mixed
If no naming strategy exists, the plain value is returned.
stringThe name to convert.
arrayThe whole data is optionally provided as context.
mixedhydrateValue(string $name, mixed $value, array $data) : mixed
If no strategy exists the plain value is returned.
stringThe name of the strategy to use.
mixedThe value that should be converted.
arrayThe whole data is optionally provided as context.
mixedremoveFilter($name) : \Zend\Stdlib\Hydrator\Filter\FilterComposite
To not extract "has" methods, you simply need to unregister it
$filterComposite->removeFilter('has');
removeNamingStrategy() : \Zend\Stdlib\Hydrator\self
\Zend\Stdlib\Hydrator\selfremoveStrategy(string $name) : \Zend\Stdlib\Hydrator\HydratorInterface
stringThe name of the strategy to remove.
setNamingStrategy(\Zend\Stdlib\Hydrator\NamingStrategy\NamingStrategyInterface $strategy) : \Zend\Stdlib\Hydrator\self
\Zend\Stdlib\Hydrator\self$filterComposite : \Zend\Stdlib\Hydrator\Filter\FilterComposite
$namingStrategy : \Zend\Stdlib\Hydrator\NamingStrategy\NamingStrategyInterface