예제 #1
0
파일: Factory.php 프로젝트: hildalove/tiny
 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;
 }
예제 #2
0
 function __construct($controller_name, $view_name)
 {
     $this->controller_name = $controller_name;
     $this->view_name = $view_name;
     $this->template_dir = Application::getInstance()->baseDir . 'templates';
 }