/** * @param array $nodeUrls * @param CacheInterface|null $cache * @param LoggerInterface|null $log * * @throws ConnectException */ public function __construct(array $nodeUrls = array(), CacheInterface $cache = null, LoggerInterface $log = null) { if (!$cache) { $cache = new MemoryCache(); } $this->cache = $cache; parent::__construct($nodeUrls, $log); }
function __construct($config = array(), $poolSize = 100) { if (empty($config['host'])) { throw new Swoole\Exception\InvalidParam("require redis host option."); } if (empty($config['port'])) { $config = self::DEFAULT_PORT; } parent::__construct($config, $poolSize); $this->create(array($this, 'connect')); }
function __construct($config, $maxConnection = 100) { if (empty($config['host'])) { throw new Swoole\Exception\InvalidParam("require mysql host option."); } if (empty($config['port'])) { $config['port'] = self::DEFAULT_PORT; } parent::__construct($config, $maxConnection); $this->create(array($this, 'connect')); }
/** * Constructor * @param array $config Config variables * @param boolean $init */ public function __construct($config = [], $init = true) { parent::__construct($config, false); $this->bound = new \PHPDaemon\Structures\ObjectStorage(); if (isset($this->config->listen)) { $this->bindSockets($this->config->listen->value); } if ($init) { $this->init(); } }
public function __construct($size, $class = Worker::class, array $ctor = array()) { $this->pipe = new Pipe(); $this->packet = new Volatile(); parent::__construct($size, $class, $ctor); }
public function __construct($size, $class, array $ctor = []) { parent::__construct($size, $class, $ctor); }
public function __construct(CommandBus $bus) { parent::__construct(5, CommandBusWorker::class, [$bus]); }
/** * @param string $path Cache directory path * @param int $defaultTtl */ public function __construct($path, $defaultTtl = 0) { parent::__construct($defaultTtl); $this->path; }
public function __construct($size, $clazz = \Worker::class, $ctor = array()) { $this->resultBag = new \Volatile(); parent::__construct($size, $clazz, $ctor); }
public function __construct($workers = 4, $class = \Worker::class, $ctor = []) { parent::__construct($workers, $class, $ctor); }