Re: Parent class

From: Date: Mon, 02 Apr 2001 12:16:02 +0000
Subject: Re: Parent class
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-46600@lists.php.net to get a copy of this message
Did you try $b->a()? It should work. -- Yasuo Ohgaki "Milan Mlynarcik" <mmlynarcik@charmed.sk> wrote in message news:3AC86E0F.B95D2332@charmed.sk... > Is there way to access paret class from outside of class ??? > I know that to access parent object from within the class I can use code > like this one: > <?php > class a > { > var a; > > function a() > { > $this->a = "OK"; > } > } > > class b extends a > { > function b() > { > // here I access a class directly > a::a(); > } > } > ?> > > But I would like to know how to access a class like this: > <?php > > $b = new b(); > // and now I want to access class a with something like > $b->a::a(); > // but this doesn't work > ?> > Is it possible ??? If yes how ??? > > > -- > 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 >

« previous php.general (#46600) next »