You are here

protected function QueryPathCssEventHandler::not in QueryPath 6

Same name and namespace in other branches
  1. 7.3 QueryPath/CssEventHandler.php \QueryPathCssEventHandler::not()
  2. 7.2 QueryPath/CssEventHandler.php \QueryPathCssEventHandler::not()
1 call to QueryPathCssEventHandler::not()
QueryPathCssEventHandler::pseudoClass in QueryPath/CssEventHandler.php

File

QueryPath/CssEventHandler.php, line 774

Class

QueryPathCssEventHandler

Code

protected function not($filter) {
  $matches = $this
    ->candidateList();
  $found = new SplObjectStorage();
  foreach ($matches as $item) {
    $handler = new QueryPathCssEventHandler($item);
    $not_these = $handler
      ->find($filter)
      ->getMatches();
    if ($not_these
      ->count() == 0) {
      $found
        ->attach($item);
    }
  }
  $this->matches = $found;
}