public function init() { parent::init(); $this->module = \kepco\Module::getInstance(); $this->client = new \GuzzleHttp\Client(['base_uri' => 'http://srm.kepco.net/', 'cookies' => true, 'allow_redirects' => false, 'headers' => ['User-Agent' => 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36', 'Cookie' => $this->cookie, 'X-CSRF-TOKEN' => $this->token]]); $this->sub = \Yii::createObject(['class' => \kepco\Redis::className(), 'hostname' => $this->module->redis_server]); }
public static function getDb() { return \kepco\Module::getInstance()->db; }
public function init() { parent::init(); $this->http = Module::getInstance()->http; }
public static function getDb() { return Module::getInstance()->i2db; }