Hello to everybody. I saw that is a "tradition" that new members do here a very short presentation. So I start saying that my native language is not english so I apoligize for gramatical and exprimal mistakes.
I am relative new in php and I search for information in this domain. A problem that i have is with the OOP. I dont know how to use the "::" operator.I have some big books with php but neither one covers this operator. I saw in some joomla code that it's use without creating an object. The "->" is in every book. Thanks
The use of :: is when you want to call a method of a class directly. You use -> on an object of a class.
An object is een instance of a class (e.g. $obj = new ClassName();) this means that the object is a piece that inheritted all kinds of properties and methods from the class. The class is the blueprint for the object. When you want to access the method from the object, you use $obj->myMethod(). What myMethod does all depents how the blueprint (class) looks like.
Now the :: operator removes the whole instance class, with it you can skip it all and access the method directly. The only downside is that your method wont be able to use the $this property.
Calling a method via :: is called a static call. (In many other languages, you first have to declare your function static before you are able to call it on a static way)
__________________ Nunchaku! Who doesn't like martial arts? =)