Re: [PHP] Class dependencies

2004-09-12 Thread Curt Zirzow
* Thus wrote Ed Lazor: > > -Original Message- > > What you can do is something like this: > > > > > 1> function __autoload($class_name) { > 2> static $_stack = array(); > 3> > > This didn't seem to work. The stack stuff just ends up dumping the value of > $class_name. Also, why chec

RE: [PHP] Class dependencies

2004-09-11 Thread Ed Lazor
> -Original Message- > What you can do is something like this: > > 1> function __autoload($class_name) { 2> static $_stack = array(); 3> 4> // push the calls of autoload here 5> array_push($_stack, $class_name); 6> 7> if ( [EMAIL PROTECTED]("$class_name.php") || 8>!cl

Re: [PHP] Class dependencies

2004-09-11 Thread Curt Zirzow
* Thus wrote Ed Lazor: > I'm creating classes that rely on the presence of other classes that I've > created. Does PHP5 provide a way to specify these dependencies or a way to > check these dependencies when the class is instantiated? For example, class > Automobile would fail to instantiate if c