public function QueryPath::after in QueryPath 6
Same name and namespace in other branches
- 7.3 QueryPath/QueryPath.php \QueryPath::after()
- 7.2 QueryPath/QueryPath.php \QueryPath::after()
1 call to QueryPath::after()
- QueryPath::textAfter in QueryPath/
QueryPath.php
File
- QueryPath/
QueryPath.php, line 710
Class
Code
public function after($data) {
$data = $this
->prepareInsert($data);
foreach ($this->matches as $m) {
$ins = $data
->cloneNode(TRUE);
if (isset($m->nextSibling)) {
$m->parentNode
->insertBefore($ins, $m->nextSibling);
}
else {
$m->parentNode
->appendChild($ins);
}
}
return $this;
}