/** * 构造函数 * * @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'); }
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'); }