Hi all,
I am writing a small extension within my app, and I was wondering if we can define a static method in the class that represents the extension, and call it later on, without instanciating the complete extension (no call to the init() method).
For example:
Yii::app()->myextension::myStaticMethod();
But it doesn’t work (basic syntax error).
Though if I do:
Yii::app()->myextension->myStaticMethod();
The method is called, but the complete extension is also instanciated (init called first).
The same applies for constants:
const YII = 'Hi';
How can I access such variable?
I don’t know if I am clear enough…
Thanks in advance,
Deude