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
>
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().
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
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
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
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
> 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
>
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
[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
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
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
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
Hello,
Does any know of an optimized solution to get all the subclasses for a parent
class?
__
Raymond Irving
13 matches
Mail list logo