Re: Getting parameters in sub-classes
| From: | Jeff Greer | Date: | Fri, 10 Nov 2000 23:27:05 +0000 |
| Subject: | Re: Getting parameters in sub-classes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-24745@lists.php.net to get a copy of this message | ||
You are creating a super class only. To access members in OtherClass you
must have this statement:
new OtherClass
instead of:
new SuperClass // won't create OtherClass
OtherClass is the sub class aka derived class
Ulrich Hacke wrote:
> Hello,
> I have the following structure:
>
> class SuperClass
> {
> ..
> }
> class OtherClass extends SuperClass
> {
> ..
> }
>
> In my PHP-document I am constructing an object $myObject = new SuperClass
> There is also a parameter in my URL like index.php3?par=somevalue
>
> How can I read this parameter in my OtherClass?
> When I try $par it is always emtpy. What do I do wrong?
>
> Thanks for any help,
> Uli
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Jeff