> I updated that in the document like: > > public function fetchSubtreeBreadthFirst( $id ); > Returns the node with ID $id and all it's children, sorted accoring to > the `Breadth-first sorting`_ algorithm. > public function fetchSubtreeDepthFirst( $id ); > Returns the node with ID $id and all it's children, sorted accoring to > the `Depth-first sorting`_ algorithm. > public function fetchSubtreeTopological( $id ); > Returns the node with ID $id and all it's children, sorted accoring to > the `Topological sorting`_ algorithm. > public function fetchSubtree( $id ); > Alias for fetchSubtreeDepthFirst(). Alright.
> > Tree modification methods: > > - Does it make sense to add a method to swap a node? E.g so you can > > replace the root node? > > I am not sure how it makes sense to just swap nodes for this, but what > we can do is using move( $nodeId, null ) for this instead. This would > involving the deletion of the old root node as well though. Does that > make sense? But that would delete the children of the original root node. That isn't always what you want. Of course you could always move all of the children first so it is really only a convenience method. Maybe we should just forget about it :) Cheers, Frederik -- Components mailing list [email protected] http://lists.ez.no/mailman/listinfo/components
