/**
  * @param string
  * @param option { hosts=>array( array('name'=>'localhost','port'=>11211)) }
  */
 function __construct($name, $option)
 {
     parent::__construct($name, $option);
     $this->mm = new Memcached();
     if (is_array($option['hosts'])) {
         foreach ($option['hosts'] as $host) {
             $this->mm->addServer($host['name'], $host['port']);
         }
     }
 }
Example #2
0
 /**
  * @param string
  * @param option { path=>'/tmp }
  */
 function __construct($name, $option)
 {
     parent::__construct($name, $option);
     $this->path = $option['path'];
     $this->name = $name;
 }