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
hasFilter(string $name) : bool
string
Index in the composite
bool
removeFilter($name) : \Zend\Stdlib\Hydrator\Filter\FilterComposite
To not extract "has" methods, you simply need to unregister it
$filterComposite->removeFilter('has');