Re: [PHP] How to Get the Sub Classes of a Parent Class

2009-10-28 Thread David Otton
2009/10/28 David Otton : > 2009/10/28 Raymond Irving : > >>  I'm try to do something like what Martin Scotta did but I'm looking for a >> solution that did not require me to loop through get_declared classes() to >> find a sub class. > > Place all your child classes in the same namespace, and use >

Re: [PHP] How to Get the Sub Classes of a Parent Class

2009-10-28 Thread David Otton
2009/10/28 Raymond Irving : >  I'm try to do something like what Martin Scotta did but I'm looking for a > solution that did not require me to loop through get_declared classes() to > find a sub class. Place all your child classes in the same namespace, and use ReflectionNamespace::getClasses().

Re: [PHP] How to Get the Sub Classes of a Parent Class

2009-10-27 Thread Martin Scotta
sub classes and initialize it dynamically. >> >> >> >> >> ________________ >> From: David Otton >> To: Raymond Irving >> Cc: PHP-General List >> Sent: Sun, October 25, 2009 10:25:27 AM >> Subject: Re: [PHP] How to Get the S

Re: [PHP] How to Get the Sub Classes of a Parent Class

2009-10-27 Thread Raymond Irving
y Thanks From: Martin Scotta To: Raymond Irving Cc: David Otton ; PHP-General List Sent: Mon, October 26, 2009 8:34:05 PM Subject: Re: [PHP] How to Get the Sub Classes of a Parent Class On Mon, Oct 26, 2009 at 10:22 PM, Raymond Irving wrote: >>This works if you know t

Re: [PHP] How to Get the Sub Classes of a Parent Class

2009-10-27 Thread Raymond Irving
neral List Sent: Mon, October 26, 2009 8:33:02 PM Subject: Re: [PHP] How to Get the Sub Classes of a Parent Class 2009/10/27 Raymond Irving : >>> I want to automatically initialize a specific sub class when the php page >>> is loaded. >> You may be able solve this with a

Re: [PHP] How to Get the Sub Classes of a Parent Class

2009-10-26 Thread Martin Scotta
On Mon, Oct 26, 2009 at 10:33 PM, David Otton < phpm...@jawbone.freeserve.co.uk> wrote: > 2009/10/27 Raymond Irving : > > >>> I want to automatically initialize a specific sub class when the php > page > >>> is loaded. > > >> You may be able solve this with a simple class_exists() (pseudo-code > a

Re: [PHP] How to Get the Sub Classes of a Parent Class

2009-10-26 Thread Martin Scotta
> To: Raymond Irving > Cc: PHP-General List > Sent: Sun, October 25, 2009 10:25:27 AM > Subject: Re: [PHP] How to Get the Sub Classes of a Parent Class > > 2009/10/25 Raymond Irving : > > > I want to automatically initialize a specific sub class when the php page >

Re: [PHP] How to Get the Sub Classes of a Parent Class

2009-10-26 Thread David Otton
2009/10/27 Raymond Irving : >>> I want to automatically initialize a specific sub class when the php page >>> is loaded. >> You may be able solve this with a simple class_exists() (pseudo-code ahead): >> >> if(class_exists($var)) { >> $class = new $var; >> } else { >> $class = new FourOhF

Re: [PHP] How to Get the Sub Classes of a Parent Class

2009-10-26 Thread Raymond Irving
[PHP] How to Get the Sub Classes of a Parent Class 2009/10/25 Raymond Irving : > I want to automatically initialize a specific sub class when the php page is > loaded. > > I'm looking for a solution for php 5.1+ or anything that's optimized for 5.3 You may be able solve this

Re: [PHP] How to Get the Sub Classes of a Parent Class

2009-10-25 Thread David Otton
2009/10/25 Raymond Irving : > I want to automatically initialize a specific sub class when the php page is > loaded. > > I'm looking for a solution for php 5.1+ or anything that's optimized for 5.3 You may be able solve this with a simple class_exists() (pseudo-code ahead): if(class_exists($var

Re: [PHP] How to Get the Sub Classes of a Parent Class

2009-10-25 Thread Raymond Irving
r 25, 2009 8:44:40 AM Subject: Re: [PHP] How to Get the Sub Classes of a Parent Class 2009/10/25 Raymond Irving : > Hello, > > Does any know of an optimized solution to get all the subclasses for a parent > class? That's not exactly a typical thing to want, although I can se

Re: [PHP] How to Get the Sub Classes of a Parent Class

2009-10-25 Thread David Otton
2009/10/25 Raymond Irving : > Hello, > > Does any know of an optimized solution to get all the subclasses for a parent > class? That's not exactly a typical thing to want, although I can see a couple of ways to do it... what exactly are you trying to do, and are you using PHP5.3? -- PHP Genera