示例#1
0
 /**
  * Constructor
  *
  * @param   array  $options  Optional parameters.
  *
  * @since   1.0
  * @throws  \RuntimeException
  */
 public function __construct($options = array())
 {
     if (!self::isSupported()) {
         throw new \RuntimeException('Wincache Extension is not available', 404);
     }
     parent::__construct($options);
 }
示例#2
0
 /**
  * Constructor
  *
  * @param   array  $options  Optional parameters. A `dbo` options is required.
  *
  * @since   1.0
  * @throws  \RuntimeException
  */
 public function __construct($options = array())
 {
     if (isset($options['db']) && $options['db'] instanceof DatabaseDriver) {
         parent::__construct($options);
     } else {
         throw new \RuntimeException(sprintf('The %s storage engine requires a `db` option that is an instance of Joomla\\Database\\DatabaseDriver.', __CLASS__));
     }
 }
示例#3
0
 /**
  * Constructor
  *
  * @param   array  $options  Optional parameters.
  *
  * @since   1.0
  * @throws  \RuntimeException
  */
 public function __construct($options = array())
 {
     if (!self::isSupported()) {
         throw new \RuntimeException('Memcache Extension is not available', 404);
     }
     parent::__construct($options);
     // This will be an array of loveliness
     // @todo: multiple servers
     $this->_servers = array(array('host' => isset($options['memcache_server_host']) ? $options['memcache_server_host'] : 'localhost', 'port' => isset($options['memcache_server_port']) ? $options['memcache_server_port'] : 11211));
 }
示例#4
0
 /**
  * Constructor
  *
  * @param   array  $options  Optional parameters.
  *
  * @since   1.0
  * @throws  \RuntimeException
  */
 public function __construct($options = array())
 {
     if (!self::isSupported()) {
         throw new \RuntimeException('Memcached Extension is not available', 404);
     }
     // This will be an array of loveliness
     // @todo: multiple servers
     $this->_servers = array(array('host' => isset($options['memcache_server_host']) ? $options['memcache_server_host'] : 'localhost', 'port' => isset($options['memcache_server_port']) ? $options['memcache_server_port'] : 11211));
     // Only construct parent AFTER host and port are sent, otherwise when register is called this will fail.
     parent::__construct($options);
 }
 /**
  * Constructor
  *
  * @param   array  $options  Optional parameters.
  *
  * @since   11.1
  * @throws  RuntimeException
  */
 public function __construct($options = array())
 {
     if (!self::isSupported()) {
         throw new RuntimeException('Memcache Extension is not available', 404);
     }
     parent::__construct($options);
     $config = Factory::getConfig();
     // This will be an array of loveliness
     // @todo: multiple servers
     $this->_servers = array(array('host' => $config->get('memcache_server_host', 'localhost'), 'port' => $config->get('memcache_server_port', 11211)));
 }