Hello,
I have submitted a proposal for Zend_Tree months ago, but it seemed like
the timing wasn't right. I also believe that the naming convention
"Tree" is causing a lot of confusion. The way I see this component, is
more like a *background component* that manipulates, stores,
hierarchical data.
We have already demonstrated a numerous amount for the need and value of
a basic, simple class wrapping PHP arrays (see discussions regarding
Zend_Hash). Tree-like manipulation of such arrays might also prove
useful to some core ZF components, such as Zend_Session, Zend_Acl,
Zend_Registry, and Zend_Config.
The ZF goals include consistency. Factoring common code into a shared
API helps this goal.
We have requested for expanding our group think/brainstorm to include
what "tree" functions might be needed by these components. But until now
there hasn't been much (not to say none) feedback on this.
Condsider the following example (thanks Gavin):
Given a user, user session, and a "social" website (like myspace.com),
perhaps a model populates a list of the user's friends who are online.
If this "tree" of data were saved to the registry, I can imagine
business logic processing that data and deciding to move some or all of
the resulting data into the user's session. The move might result in a
merging of values with an existing namespace in the user's session, or
the creation of a new namespace, both "tree" operations. Both
Zend_Session and Zend_Acl appear to have several reasons to modify or
display some or all of their "tree" data structures, sometimes in ways
more complex than provided by simple accessors.
Best regards,
Andries Seutens
Belgium
http://andries.systray.be
Nick Lo schreef:
Hi Eugene,
There was a proposal for Zend_Tree that was rejected. You can read about
it here...
http://www.zend.com/lists/fw-general/200604/msg00096.html
...and the reason for its rejection...
--------------------------------------------
Reviewed by Zend team on Thursday, 20 Apr 2006.
Decision: Rejected
At this time, we see this as a general-purpose class
that would be useful but doesn't fit into our core.
There is a PEAR package, Tree, with very similar goals.
However, it hasn't been updated since 2003. See:
http://pear.php.net/package/Tree
There is also an actively supported tree class as part of
the Horde framework, see:
http://dev.horde.org/api/framework/Horde_Tree/Horde_Tree.html
We'd suggest contacting these developers to see if you can
contribute your ideas to further their efforts.
-------------------------------------------
Nick
Let me know, did anybody wrote class for work with Nested Sets Tree
(4 ZF)?
PS: Nested Sets it's vefy fast algo 4 work with Database Trees :)