I'm really sick of typing $this->database
or $this->otherVarOrFunc
every time I call something in my controller/model/wherever else.
Is there some sort of OOP trick to have for example $database
instead of $this->database
in every function of my controller?
I have well defined structure of BaseController on MVC level and BaseObject for everything else class related. These two contains 5 to 20 object variables (depends on app size ) and I would be much more satisfied if typing $this->
wasnt required.
Does it have negative impact on overall performance?
Thanks in advance