public function not($selector) { $callback = $this->getSelectorCallback($selector); return $this->filter(function (\DOMNode $node, $index) use($callback) { return !$callback($node, $index); }); }