I don't know what its doing when we have this situation
Foo::Bar
It looks like a path
I don't know what its doing when we have this situation
Foo::Bar
It looks like a path
The ::
operator is the scope resolution operator. It is used to access class constants or static properties and methods, either from outside the class:
ClassName::CONSTANT_VALUE
ClassName::staticMethod()
Or within a class method to reference the same or a parent class using self
and parent
:
self::CONSTANT_VALUE
self::staticMethod()
parent::CONSTANT_VALUE
parent::staticMethod()
That's (generally) for accessing a static method or property in a class. It's called the scope resolution operator, or Paamayim Nekudotayim (which leads to some amazingly confusing error messages!). See http://www.php.net/manual/en/language.oop5.paamayim-nekudotayim.php.