public function run($args = array()) { parent::run($args); // start the session if (!$this->di['session']->isStarted()) { $this->di['session']->start(); } }
public function run($args = array()) { parent::run($args); // Call the task action specified $class = '\\Tasks\\' . ucfirst($args['task']) . 'Task'; if (!class_exists($class)) { throw new \Exception("Task '{$args['task']}' doesn't exist!"); } $action = strtolower($args['action']) . 'Action'; $task = new $class(); return call_user_func_array([$task, $action], $args['params']); }
public function run($args = array()) { parent::run($args); // initialize our benchmarks $this->di['util']->startBenchmark(); // create the mvc application $application = new Application($this->di); // run auth init $this->di['auth']->init(); // output the content. our benchmark is finished in the base // controller before output is sent. echo $application->handle()->getContent(); }