/** * 加载array数据到对象的变量里. 这个函数是Farm的getObject结尾会调用的函数.这个函数实际是toArray对应的toObject * 注意,mode,maxq,iniq变量是通过config文件查出来的,而不是存在数据库的。 */ public function load($data) { $this->i = $data['i']; $this->t = $data['t']; $activityCfg = ActivityConfig::get($this->t); Utility::logInfo('Class::ActivityConfig.load(' . $this->t . ')'); $this->jqes = $data['jqes']; $this->jobs = $data['jobs']; $this->jops = $data['jops']; $this->mode = $activityCfg['mode']; $this->maxq = $activityCfg['maxq']; $this->iniq = $activityCfg['iniq']; }