public function QueryPathCssEventHandler::attribute in QueryPath 6
Same name and namespace in other branches
- 7.3 QueryPath/CssEventHandler.php \QueryPathCssEventHandler::attribute()
- 7.2 QueryPath/CssEventHandler.php \QueryPathCssEventHandler::attribute()
Overrides CssEventHandler::attribute
2 calls to QueryPathCssEventHandler::attribute()
- QueryPathCssEventHandler::lang in QueryPath/
CssEventHandler.php - QueryPathCssEventHandler::pseudoClass in QueryPath/
CssEventHandler.php
File
- QueryPath/
CssEventHandler.php, line 215
Class
Code
public function attribute($name, $value = NULL, $operation = CssEventHandler::isExactly) {
$found = new SplObjectStorage();
$matches = $this
->candidateList();
foreach ($matches as $item) {
if ($item
->hasAttribute($name)) {
if (isset($value)) {
if ($this
->attrValMatches($value, $item
->getAttribute($name), $operation)) {
$found
->attach($item);
}
}
else {
$found
->attach($item);
}
}
}
$this->matches = $found;
$this->findAnyElement = FALSE;
}