Example #1
0
File: model.php Project: Junec/core
 /**
  * 构造函数
  *
  * @return void
  */
 public function __construct()
 {
     if (!$this->dbConfig) {
         $this->dbConfig = core::getConfig('db_config');
     }
     $this->adapter = core_database_factory::getInstance('pdo', $this->dbConfig);
     $this->cache = core_cache_factory::getInstance('filesystem');
 }
Example #2
0
 public static function test()
 {
     $m = core::instance('crontabs_model');
     $r = $m->getAdapter()->client;
     var_dump($r);
     $cache = core_cache_factory::getInstance('filesystem');
     $cache->set('testkey', '123123123');
 }