Posted by Hero Wanders on 07/13/05 04:24
Hello!
> $Graph =& Image_Graph::factory('graph', array(400, 300));
> $Font =& $Graph->addNew('ttf_font', 'Gothic');
>
> I slice some of the code... so I do not really understand what is :: is
> mean and function adn ->
ClassName::staticMethod()
calls the *static* method "staticMethod" in ClassName.
:: is the operator the access static methods.
Static methods can be called without having an object of the concerning
class. Therefore static methods (actually a function a class) may not
use "$this".
$object->method() calls the method "method" of the object referenced by
"$object". Non-static methods work with the state of the object they
belong to.
If you still do not know the difference between static and non-static
methods you should consult some OOP-explaining websites or books.
HTH
Hero Wanders
Navigation:
[Reply to this message]
|