public function QueryPath::remove in QueryPath 6
Same name and namespace in other branches
- 7.3 QueryPath/QueryPath.php \QueryPath::remove()
- 7.2 QueryPath/QueryPath.php \QueryPath::remove()
File
- QueryPath/
QueryPath.php, line 958
Class
Code
public function remove($selector = NULL) {
if (!empty($selector)) {
$this
->find($selector);
}
$found = new SplObjectStorage();
foreach ($this->matches as $item) {
$found
->attach($item->parentNode
->removeChild($item));
}
$this
->setMatches($found);
return $this;
}