You are here

public function HasFilter::filter in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-hydrator/src/Filter/HasFilter.php \Zend\Hydrator\Filter\HasFilter::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/HasFilter.php, line 14

Class

HasFilter

Namespace

Zend\Hydrator\Filter

Code

public function filter($property) {
  $pos = strpos($property, '::');
  if ($pos !== false) {
    $pos += 2;
  }
  else {
    $pos = 0;
  }
  if (substr($property, $pos, 3) === 'has') {
    return true;
  }
  return false;
}