Is it possible to do something like this self::in PHP so as not to require the invocation of a class-type tro to invoke the static method in the same class. See how I do it:
public class Foo
public static void blaa() {...}
public void foobar
{
Foo.blaa();
}
but I would like it to be like
public class Foo
public static void blaa() {...}
public void foobar
{
_SOME_SORT_OF_SELF_.blaa();
}
no need to write the class name again and again ... The same goes for static attributes. Instead of using Foo.MY_ATTRit is possible to access it through _SOME_SORT_OF_SELF_.MY_ATTR.
Possible? Thanks
source
share