Esempio n. 1
0
 /**
  *  constructor
  *
  */
 public function __construct(Ethna_ContainerInterface $container)
 {
     parent::__construct($container);
     if ($this->opt['use_pconnect']) {
         $this->m = new Memcached($container->getAppId());
     } else {
         $this->m = new Memcached();
     }
     if (isset($this->opt['servers']) && is_array($this->opt['servers'])) {
         $this->m->addServers($this->opt['servers']);
     } else {
         $this->m->addServer($this->opt['host'], $this->opt['port']);
     }
     $this->m->setOption(Memcached::OPT_CONNECT_TIMEOUT, $this->opt['timeout'] * 1000);
     //$this->m->setOption(Memcached::OPT_CONNECT_TIMEOUT, $this->opt['retry']);
 }
Esempio n. 2
0
 /**
  *  コンストラクタ
  *
  *  @access public
  */
 public function __construct(Ethna_ContainerInterface $container)
 {
     parent::__construct($container);
     $this->memcache_pool = array();
 }
Esempio n. 3
0
 /**
  *  コンストラクタ
  *
  *  @access public
  */
 public function __construct($controller)
 {
     parent::__construct($controller);
     $this->memcache_pool = array();
 }
Esempio n. 4
0
 public function __construct(Ethna_ContainerInterface $container)
 {
     parent::__construct($container);
     $this->tmpDir = $container->getTmpdir();
 }