I'm trying to figure out how to call a specific statuc function each time a Yii page is loaded. It seems like a simple thing but I can't figure out how to do it without modifying base framework files.
I tried making a master Controller class (MasterController) that every other controller extends, but there doesn't seem to be a way to include the MasterController.php file after CController is loaded, but before MypageController is loaded. Does anyone know if that is possible?
Here's what I've got:
<?php
class SomeClass
{
public static function someFunction()
{
// do things
}
}
?>
All I want is for SomeClass::someFunction() to be called no matter what controller is used. I can manually put the function call inside init() for controller, but that seems like a really ugly way to do it…
I hope that all makes sense… Thanks in advance for any help you can give.