You are here

public function FilterEnabledInterface::addFilter in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-hydrator/src/FilterEnabledInterface.php \Zend\Hydrator\FilterEnabledInterface::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

1 method overrides FilterEnabledInterface::addFilter()
AbstractHydrator::addFilter in vendor/zendframework/zend-hydrator/src/AbstractHydrator.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/FilterEnabledInterface.php, line 37

Class

FilterEnabledInterface

Namespace

Zend\Hydrator

Code

public function addFilter($name, $filter, $condition = Filter\FilterComposite::CONDITION_OR);