Parent class
| From: | Milan Mlynarcik | Date: | Mon, 02 Apr 2001 12:18:23 +0000 |
| Subject: | Parent class | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-46590@lists.php.net to get a copy of this message | ||
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 ???