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

2009-10-28 Thread David Otton
2009/10/28 Raymond Irving xwis...@yahoo.com:  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 David Otton phpm...@jawbone.freeserve.co.uk: 2009/10/28 Raymond Irving xwis...@yahoo.com:  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

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

2009-10-27 Thread Raymond Irving
David, 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. __ Raymond Irving From: David Otton phpm...@jawbone.freeserve.co.uk To: Raymond

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

2009-10-27 Thread Raymond Irving
Hi Martin, This works great but I was hoping that I didn't have to loop through get_declared_classes to find the sub class. Is there a way to get the subclasses using Reflection? For example: $r = new ReflectionClass($name); print_r($r-getSubClasses()); Many Thanks

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

2009-10-27 Thread Martin Scotta
On Tue, Oct 27, 2009 at 9:30 PM, Raymond Irving xwis...@yahoo.com wrote: Hi Martin, This works great but I was hoping that I didn't have to loop through get_declared_classes to find the sub class. Is there a way to get the subclasses using Reflection? For example: $r = new

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

2009-10-25 Thread David Otton
2009/10/25 Raymond Irving xwis...@yahoo.com: 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?

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

2009-10-25 Thread 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 From: David Otton phpm...@jawbone.freeserve.co.uk To: Raymond Irving xwis...@yahoo.com Cc:

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

2009-10-25 Thread David Otton
2009/10/25 Raymond Irving xwis...@yahoo.com: 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):