public function NumberOfParameterFilter::filter in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/zendframework/zend-hydrator/src/Filter/NumberOfParameterFilter.php \Zend\Hydrator\Filter\NumberOfParameterFilter::filter()
Parameters
string $property the name of the property:
Return value
bool
Throws
Overrides FilterInterface::filter
File
- vendor/
zendframework/ zend-hydrator/ src/ Filter/ NumberOfParameterFilter.php, line 37
Class
Namespace
Zend\Hydrator\FilterCode
public function filter($property) {
try {
$reflectionMethod = new ReflectionMethod($property);
} catch (ReflectionException $exception) {
throw new InvalidArgumentException("Method {$property} doesn't exist");
}
return $reflectionMethod
->getNumberOfParameters() === $this->numberOfParameters;
}