示例#1
0
文件: _Redis.php 项目: rosko/workapp
 public function __construct()
 {
     parent::__construct();
     if ($this->registry["redis"]["enable"]) {
         $options = array('servers' => array(array('host' => $this->registry["redis"]["host"], 'port' => $this->registry["redis"]["port"])));
         $this->rediska = new Rediska($options);
     }
 }
示例#2
0
 public function __construct()
 {
     parent::__construct();
     if ($this->registry["memc"]) {
         $this->cache = new Memcache();
         $this->cache->connect($this->registry["memc_adres"], $this->registry["memc_port"]);
     }
 }
示例#3
0
 function __construct()
 {
     parent::__construct();
     $this->view = $this->registry['view'];
     $this->model = new Engine_Model();
     $this->action = $this->registry["action"];
     $this->args = $this->registry["args"];
     $this->get = $this->registry["get"];
     $this->post = $this->registry["post"];
 }
示例#4
0
文件: Redis.php 项目: rosko/workapp
 public function __construct()
 {
     parent::__construct();
     if ($this->registry["redis"]["enable"]) {
         $this->cache = new Redis();
         if (isset($this->registry["redis"]["socket"])) {
             $this->cache->connect($this->registry["redis"]["socket"]);
         } else {
             if (isset($this->registry["redis"]["host"]) and isset($this->registry["redis"]["port"])) {
                 $this->cache->connect($this->registry["redis"]["host"], $this->registry["redis"]["port"]);
             } else {
                 if (isset($this->registry["redis"]["host"])) {
                     $this->cache->connect($this->registry["redis"]["host"]);
                 }
             }
         }
         $this->cache->setOption(Redis::OPT_PREFIX, 'ttw:');
     }
 }
示例#5
0
文件: View.php 项目: rosko/workapp
 function __construct()
 {
     parent::__construct();
     $this->main = $this->registry['layouts'];
     $this->twig = $this->registry['templates'];
 }
示例#6
0
文件: Router.php 项目: norayrx/otms
 function __construct()
 {
     parent::__construct();
 }
示例#7
0
文件: notAjax.php 项目: rosko/workapp
 function __construct()
 {
     parent::__construct();
     $this->view = $this->registry["view"];
 }
示例#8
0
文件: Ajax.php 项目: rosko/workapp
 function __construct()
 {
     parent::__construct();
     $this->initView();
 }
示例#9
0
文件: Model.php 项目: rosko/workapp
 function __construct()
 {
     parent::__construct();
     $this->memcached = $this->registry['memcached'];
 }