protected function find_nodes_after($node) {
        $return = array();
        $nodearray = $this->nodes;
        foreach ($nodearray as $nodeelement) {
            if ($nodeelement->after === $node->name) {
                // Find all nodes that comes after this node as well.
                $return = array_merge($return, array($nodeelement->name => $nodeelement), $this->find_nodes_after($nodeelement));
            }
        }
        return $return;
    }
protected function find_nodes_after($node) {
        $return = array();
        $nodearray = $this->nodes;
        foreach ($nodearray as $nodeelement) {
            if ($nodeelement->after === $node->name) {
                // Find all nodes that comes after this node as well.
                $return = array_merge($return, array($nodeelement->name => $nodeelement), $this->find_nodes_after($nodeelement));
            }
        }
        return $return;
    }
protected function find_nodes_after ( $ node ) { $ return = array ( ) ; $ nodearray = $ this -> nodes ; foreach ( $ nodearray as $ nodeelement ) { if ( $ nodeelement -> after === $ node -> name ) { // Find all nodes that comes after this node as well. $ return = array_merge ( $ return , array ( $ nodeelement -> name => $ nodeelement ) , $ this -> find_nodes_after ( $ nodeelement ) ) ; } } return $ return ; }
Given a node object find all node objects that should appear after it.

@param node $node node object

@return array
Given a node object find all node objects that should appear after it .