public function AbstractHydrator::addFilter in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/zendframework/zend-hydrator/src/AbstractHydrator.php \Zend\Hydrator\AbstractHydrator::addFilter()
Add a new filter to take care of what needs to be hydrated. To exclude e.g. the method getServiceLocator:
<code> $composite->addFilter("servicelocator", function ($property) { list($class, $method) = explode('::', $property); if ($method === 'getServiceLocator') { return false; } return true; }, FilterComposite::CONDITION_AND ); </code>
Parameters
string $name Index in the composite:
callable|Filter\FilterInterface $filter:
int $condition:
Return value
Filter\FilterComposite
Overrides FilterEnabledInterface::addFilter
1 call to AbstractHydrator::addFilter()
- ClassMethods::addFilter in vendor/
zendframework/ zend-hydrator/ src/ ClassMethods.php - Add a new filter to take care of what needs to be hydrated. To exclude e.g. the method getServiceLocator:
1 method overrides AbstractHydrator::addFilter()
- ClassMethods::addFilter in vendor/
zendframework/ zend-hydrator/ src/ ClassMethods.php - Add a new filter to take care of what needs to be hydrated. To exclude e.g. the method getServiceLocator:
File
- vendor/
zendframework/ zend-hydrator/ src/ AbstractHydrator.php, line 207
Class
Namespace
Zend\HydratorCode
public function addFilter($name, $filter, $condition = Filter\FilterComposite::CONDITION_OR) {
return $this->filterComposite
->addFilter($name, $filter, $condition);
}