On Tue, 24 Jul 2007, Frederik Holljen wrote:

> > public function fetchSubtree( $id, $searchMethod = ezcTree::DEPTH_FIRST );
> >     Returns the node with ID $id and all it's children, the order depends
> >     on the search method. See "Sorting_" for more information on the 
> >     supported algorithms.
>
> I think we should avoid hard coding the $searchMethods in ezcTree as it makes 
> it cumbersome to add new algorithms.

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().


> 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?

regards,
Derick
-- 
Derick Rethans
eZ components Product Manager
eZ systems | http://ez.no
-- 
Components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/components

Reply via email to