Graham Anderson writes a very interesting proposal; If you are interested in an implementation of storing and retrieving hierarchical data as a nested set, please take a few minutes to review my new proposal.
I dusted off some old code and poked and prodded a little until it behaved somewhat as expected, there’s a functioning prototype on GitHub with some basic instructions in the README.
As you probably guessed the algorithm is modified pre-order traversal, and the current working functionality is as follows
- Store single trees or multiple trees in same table
- Add, move & delete individual tree nodes or tree branches
- operate on result set nodes(getPath(),getSiblings(),getDescendants(), etc )
- Result-set as multi-dimensional associative array (Zend_Navigation)
- Result-set as recursive iterator
Cheers the noo,