public function QueryPathCssEventHandler::elementID in QueryPath 7.2
Same name and namespace in other branches
- 6 QueryPath/CssEventHandler.php \QueryPathCssEventHandler::elementID()
- 7.3 QueryPath/CssEventHandler.php \QueryPathCssEventHandler::elementID()
Overrides CssEventHandler::elementID
File
- QueryPath/
CssEventHandler.php, line 86
Class
Code
public function elementID($id) {
$found = new SplObjectStorage();
$matches = $this
->candidateList();
foreach ($matches as $item) {
if ($item
->hasAttribute('id') && $item
->getAttribute('id') === $id) {
$found
->attach($item);
break;
}
}
$this->matches = $found;
$this->findAnyElement = FALSE;
}