public function QueryPath::hasClass in QueryPath 6
Same name and namespace in other branches
- 7.3 QueryPath/QueryPath.php \QueryPath::hasClass()
- 7.2 QueryPath/QueryPath.php \QueryPath::hasClass()
File
- QueryPath/
QueryPath.php, line 1558
Class
Code
public function hasClass($class) {
foreach ($this->matches as $m) {
if ($m
->hasAttribute('class')) {
$vals = explode(' ', $m
->getAttribute('class'));
if (in_array($class, $vals)) {
return TRUE;
}
}
}
return FALSE;
}