__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
);
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.
extractName(string $name, null $object) : mixed
If no naming strategy exists, the plain value is returned.
string
The name to convert.
null
The object is optionally provided as context.
mixed
extractValue(string $name, mixed $value, mixed $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.
mixed
The object is optionally provided as context.
mixed
getFilter() : \Zend\Stdlib\Hydrator\Filter\FilterComposite
getNamingStrategy() : \Zend\Stdlib\Hydrator\NamingStrategy\NamingStrategyInterface
getStrategy(string $name) : \Zend\Stdlib\Hydrator\Strategy\StrategyInterface
string
The name of the strategy to get.
\Zend\Stdlib\Exception\InvalidArgumentException |
---|
hasFilter(string $name) : bool
string
Index in the composite
bool
hasNamingStrategy() : bool
bool
hasStrategy(string $name) : bool
string
The name of the strategy to check for.
bool
hydrateName(string $name, array $data) : mixed
If no naming strategy exists, the plain value is returned.
string
The name to convert.
array
The whole data is optionally provided as context.
mixed
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');
removeNamingStrategy() : \Zend\Stdlib\Hydrator\self
\Zend\Stdlib\Hydrator\self
removeStrategy(string $name) : \Zend\Stdlib\Hydrator\HydratorInterface
string
The 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