views:

32

answers:

1

I know it wouldn't be exactly equivalent to $this, but is there a way to reference a static class from within itself without using the name of the class itself? ( like super but for itself ) This is just a way to avoid having to refactor all the class references if the class is renamed.

Example:
class foo {
function bar() {
static_this::method(); // instead of:
foo::method(); }
}

( sorry about the curly braces placement, but "indent code by 4 spaces" doesn't seem to work )

+6  A: 
self::method();
Nat Ryall
ill add.. read this http://php.net/manual/en/language.oop5.php
Galen