I suggest you should use MerlinWork ;-) It does these things for you.
Fabrizio Balliano Il ven, 2003-10-03 alle 16:23, Gerard Samuel ha scritto: > Or is there such a thing. ;) > I have a small collection of utility classes, and it seems like the more > I add, > the more cumbersome things seem to get. > A brief synopsis of code execution. > 1. Start DB class > 2. Start Smarty class, passing reference of DB class to Smarty > 3. When needed start Date-Time class > 4. When needed start Text-Format class, passing reference of Smarty > class to Text-Format class, > which also has a reference to the DB class. (Im using both within the > Text-Format class) > > Currently, I have a file of functions that handle user management, a > possible candidate for a class. > If I were to convert it, it would go between steps 1 and 2, and would > need a reference to the DB class. > Then the Smarty class is going to need a reference of the proposed user > management class. > By that time, Smarty contains itself, a reference to the DB class, > reference to the user management class which > in turn contains a reference to the DB class. > All these references, are beginning to worry me, to the point where Im > second guessing myself, that > Im going about this the wrong way. > Making "utility" classes are somewhat straight forward, but getting them > to work together, > seems like a pain. > > So I was thinking, if a class was started in the global space, is it a sin, > to use the $GLOBALS array to access it, instead of tying in all these > references?? > > Thanks for any input you may provide. -- Fabrizio Balliano ________ CREALABS Viale dei Mughetti, 13/A - 10151 Torino - Italy Tel. +39-011-735645 - Fax +39-011-735645 http://www.crealabs.it - mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php