You are here

public function MethodMatchFilter::filter in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-hydrator/src/Filter/MethodMatchFilter.php \Zend\Hydrator\Filter\MethodMatchFilter::filter()

Should return true, if the given filter does not match

Parameters

string $property The name of the property:

Return value

bool

Overrides FilterInterface::filter

File

vendor/zendframework/zend-hydrator/src/Filter/MethodMatchFilter.php, line 36

Class

MethodMatchFilter

Namespace

Zend\Hydrator\Filter

Code

public function filter($property) {
  $pos = strpos($property, '::');
  if ($pos !== false) {
    $pos += 2;
  }
  else {
    $pos = 0;
  }
  if (substr($property, $pos) === $this->method) {
    return !$this->exclude;
  }
  return $this->exclude;
}