Zend Framework
3.0
|
Public Member Functions | |
addFilter ($name, $filter, $condition=Filter\FilterComposite::CONDITION_OR) | |
Add a new filter to take care of what needs to be hydrated. | |
hasFilter ($name) | |
Check whether a specific filter exists at key $name or not. | |
removeFilter ($name) | |
Remove a filter from the composition. | |
Public Member Functions inherited from FilterProviderInterface | |
getFilter () | |
Provides a filter for hydration. | |
addFilter | ( | $name, | |
$filter, | |||
$condition = Filter\FilterComposite::CONDITION_OR |
|||
) |
Add a new filter to take care of what needs to be hydrated.
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 | $name | Index in the composite |
callable | Filter\FilterInterface | $filter | |
int | $condition |
Implemented in ClassMethods, and AbstractHydrator.
hasFilter | ( | $name | ) |
Check whether a specific filter exists at key $name or not.
string | $name | Index in the composite |
Implemented in AbstractHydrator.
removeFilter | ( | $name | ) |
Remove a filter from the composition.
To not extract "has" methods, you simply need to unregister it
$filterComposite->removeFilter('has');
$name |
Implemented in AbstractHydrator, and ClassMethods.