[nycphp-talk] Optimal Object, property, variable passing strategybetween classes
Hans Zaunere
lists at zaunere.com
Fri Jul 15 10:40:24 EDT 2005
> I am using PHP 5 and should have read this chapter more completely!
>
> PHP 5 Object, Patterns, and Practice: Page 141, "The Singleton Pattern,
> The global variable is one of the great bugbears of OOP..." More bedtime
> reading...
>
> Plus for ready only, copy-on-write behavior would eliminate the overhead
> problem.
Exactly. PHP uses copy-on-write, so even if the ampersand is not used when
passing variables, the variable's data isn't copied unless it's changed in
the local scope.
> Since we have that licked, another question. I have not been able to
> find canned functions for turning a MySQL DB linked list (id,
> description, parent id) into an array tree. Managing categories seems
> like such a popular task, that I'm surprised that I have not found
> standard functions for the front-end, back-end admin. Etc. Has anyone
> tried PEAR HTML_TreeMenu or Tree (which at 0.2.4 (beta) released on
> 2003-03-17 does not seem very active) to do this?
I haven't, sorry, but prefer NSM when dealing with hierarchies.
http://www.pcomd.net/pnsm
It needs some work though.
Fear Joe:
http://www.dbmsmag.com/9604d06.html
---
Hans Zaunere
President, Founder
New York PHP
http://www.nyphp.org
AMP Technology
Supporting Apache, MySQL and PHP
More information about the talk
mailing list