Пример #1
0
 public function __construct()
 {
     $this->autoloadConfig();
     $this->instance = new PeclMemcache();
     foreach ($this->config['servers'] as $row) {
         $result = $this->instance->addserver($row['host'], !empty($row['port']) ? $row['port'] : null);
         if (!$result) {
             throw new Exception('Failed to connect to server:' . print_r($row, true));
         }
     }
 }