Re: User class(es)
| From: | Thomas Hurst | Date: | Fri, 11 May 2001 02:11:17 +0000 |
| Subject: | Re: User class(es) | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-371@lists.php.net to get a copy of this message | ||
On 29 Apr 2001 07:02:54 -0700, azatoth@hem.passagen.se (Erik Hjortsberg)
wrote:
> <code>
> class ClassB extends ClassA {
>
> function method($var) {
> new stuff.....
> return $this->_method($var)
> }
> }
>
> </code>
I'm sure I read somewhere that you could use ClassA::method($var);
In fact, let's try it..
<?php
class a
{
function foo()
{
print $this->bar;
}
}
class b
{
var $bar;
function wibble($foo)
{
$this->bar = $foo;
a::foo();
}
}
$b = new b;
$b->wibble('Moo!');
?>
freaky@eon:~/public_html$ php -q sc.php
Moo!
Looks good to me.
--
Thomas 'Freaky' Hurst - freak@aagh.net - http://www.aagh.net/