| Posted by Jerry Stuckle on 08/29/07 00:39 
Phil Latio wrote:> I'm designing a small framework with a lot of classes (1 file per class) and
 > want to know the best method of calling each class?
 >
 > Obviously I could I call each file that is used but that could be 10 or more
 > include statements. I am wonering if there is a better way? It's bit
 > annoying you can't build packages like Java.
 >
 > Cheers
 >
 > Phil
 >
 >
 
 I just put in the include statements.
 
 Actually, I don't use include - I use require_once.  And if a class
 depends on another class (often in my case), the require_once goes in
 the requiring file.
 
 That way the main file only needs to worry about what it needs, as each
 file takes care of its own includes.
 
 __autoload is good - but it requires extra processing over and above a
 require_once, and pretty much everything has to reside in the same
 directory.
 
 --
 ==================
 Remove the "x" from my email address
 Jerry Stuckle
 JDS Computer Training Corp.
 jstucklex@attglobal.net
 ==================
 [Back to original message] |