Hi Tom,
>I looked at your link "http://www.mm4.de/php4win/tips.php3?id=1" and found
>that "parent::classname()" worked. But how? Usualy PHP uses a "->" like
>"$this->classname()". I've never before seen the two "::" - Can someone
>explain?
This syntax is borrowed from C++ (or Java) and is a way to access methods
of classes which have no instance. This is also called a static method.
So if you have
class myclass
{
function myfunction()
{
...
}
}
you can access this function via "myclass::myfunction()", even if there is
no object instantiated. "parent" is a reserved word to access functions of
the superclass.
(I hope I got everything right ;-)
Regards
Alex
--
| Alexander Wirtz | eMail: [EMAIL PROTECTED] |
| web@ctive GmbH | WWW: http://www.web-active.com |
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]