Add a filter to the composite. Has to be indexed with $name in order to identify a specific filter.
This example will exclude all methods from the hydration, that starts with ‘getService’ <code> $composite->addFilter(‘exclude’,
- function($method) {
- if (preg_match(‘/^getService/’, $method) {
- return false;
} return true;
}, FilterComposite::CONDITION_AND
); </code>
Parameters: |
|
---|---|
Throws InvalidArgumentException: | |
Return type: | FilterComposite |
Remove a filter from the composition
Parameters: | $name – Identifier for the filter |
---|---|
Return type: | FilterComposite |
Check if $name has a filter registered
Parameters: | $name – Identifier for the filter |
---|---|
Return type: | bool |
Filter the composite based on the AND and OR condition Will return true if one from the “or conditions” and all from the “and condition” returns true. Otherwise false
Parameters: | $property – Parameter will be e.g. ParentNamespaceClass::method |
---|---|
Return type: | bool |