public function QueryPath::filter in QueryPath 6
Same name and namespace in other branches
- 7.3 QueryPath/QueryPath.php \QueryPath::filter()
- 7.2 QueryPath/QueryPath.php \QueryPath::filter()
2 calls to QueryPath::filter()
- QueryPath::children in QueryPath/
QueryPath.php - QueryPath::siblings in QueryPath/
QueryPath.php
File
- QueryPath/
QueryPath.php, line 469
Class
Code
public function filter($selector) {
$found = new SplObjectStorage();
foreach ($this->matches as $m) {
if (qp($m, NULL, $this->options)
->is($selector)) {
$found
->attach($m);
}
}
$this
->setMatches($found);
return $this;
}