private function getNodeStatus(\DOMNode $node, $index, callable $filter = NULL, callable $stopAt = NULL) { return [empty($filter) || $filter($node, $index), !empty($stopAt) && $stopAt($node, $index)]; }