You are here

public function QueryPathCssEventHandler::element in QueryPath 7.2

Same name and namespace in other branches
  1. 6 QueryPath/CssEventHandler.php \QueryPathCssEventHandler::element()
  2. 7.3 QueryPath/CssEventHandler.php \QueryPathCssEventHandler::element()

Overrides CssEventHandler::element

File

QueryPath/CssEventHandler.php, line 101

Class

QueryPathCssEventHandler

Code

public function element($name) {
  $matches = $this
    ->candidateList();
  $this->findAnyElement = FALSE;
  $found = new SplObjectStorage();
  foreach ($matches as $item) {
    if ($item->tagName == $name) {
      $found
        ->attach($item);
    }
  }
  $this->matches = $found;
}