示例#1
0
 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]);
 }
示例#2
0
 public static function getDb()
 {
     return \kepco\Module::getInstance()->db;
 }
示例#3
0
 public function init()
 {
     parent::init();
     $this->http = Module::getInstance()->http;
 }
示例#4
0
 public static function getDb()
 {
     return Module::getInstance()->i2db;
 }