controller = $GLOBALS['controller']; $this->action = $GLOBALS['action']; $this->queryString = $GLOBALS['querystring']; // Initiate the loader $this->load = loadClass('Loader'); // Initiate the autoloader Helpers $helpers = configuration('helpers', 'SuperSmash'); if(count($helpers) > 0) { foreach($helpers as $helper) { $this->load->helpers($helper); } } // Intiate the autoloader Libraries $libraries = configuration('libraries', 'SuperSmash'); if(count($libraries) > 0) { foreach($libraries as $library) { $this->load->libraries($library); } } } // This function will get the controller instance public static function getInstance() { return self::$instance; } // This function will be called before an action is taken public function _beforeAction() { // We can write some custom code here that will be taken before an action is made } // This function will be called after an action is taken public function _afterAction() { // We can write some custom code here that will be taken after an action is made } } ?>