Beispiel #1
0
 public function __construct($options)
 {
     parent::__construct($options);
     if (!isset($options['driver'])) {
         throw new Exception\InvalidArgumentException('Key "driver" must exist in options.');
     }
     $this->driver = $options['driver'];
 }
 public function __construct()
 {
     parent::__construct();
     if (!class_exists('redis')) {
         exit('Redis初始化连接失败');
     }
     ini_set('default_socket_timeout', 50);
     //socket连接超时时间;
     $this->redis = new \redis();
     // 如果用框架 此处最好走配置文件
     $host = '127.0.0.1';
     $port = '6379';
     $this->pre = 'WeixinApi:';
     $link = $this->redis->connect($host, $port, 40);
     if (!$link) {
         exit('Redis初始化连接失败');
     }
 }
Beispiel #3
0
 /**
  * Generic constructor.
  */
 public function __construct()
 {
     parent::__construct('generic');
 }
 /**
  * OracleVirtualbox constructor.
  */
 public function __construct()
 {
     parent::__construct('virtualbox');
 }
Beispiel #5
0
 /**
  * Generic constructor.
  */
 public function __construct()
 {
     parent::__construct('digitalocean');
 }