public function __construct($options = array())
 {
     parent::__construct();
     $this->useSelfDb = false;
     global $db;
     if (!is_object($db)) {
         //PHP 5.2.0 bug workaround。这是ZenCart原来的注释,Jianhui迁移Session的时候,迁移过来的。
         $db = new queryFactory();
         $db->connect($options['host'], $options['username'], $options['password'], $options['database'], $options['use_pconnect'], false);
         $this->useSelfDb = true;
     }
     $this->db = $db;
 }
 public function __construct($options = array())
 {
     parent::__construct();
     if (empty($options['master_servers'])) {
         $this->masterServersConfig = array(array("host" => "127.0.0.1", "port" => 11211));
     } else {
         $this->masterServersConfig = $options['master_servers'];
     }
     if (empty($options['slave_servers'])) {
         $this->slaveServersConfig = array(array("host" => "127.0.0.1", "port" => 11212));
     } else {
         $this->slaveServersConfig = $options['slave_servers'];
     }
 }