public static function getRedis() { $config = Application::getInstance()->config['redis']; $redis = Register::get('redis'); if (!$redis) { $redis = new \Redis(); $redis->connect($config['host'], $config['port']); Register::set('redis', $redis); } return $redis; }
function __construct($controller_name, $view_name) { $this->controller_name = $controller_name; $this->view_name = $view_name; $this->template_dir = Application::getInstance()->baseDir . 'templates'; }