public function __construct(callable $app, array $options = array()) { parent::__construct($app); $this->options = array_merge(['flags' => XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY, 'prefix' => 'pux_', 'output_dir' => ini_get('xhprof.output_dir') ?: '/tmp', 'root' => null], $options); if (!$this->options['root']) { throw new LogicException("xhprof root is not defined."); } include_once $this->options['root'] . "/xhprof_lib/utils/xhprof_lib.php"; include_once $this->options['root'] . "/xhprof_lib/utils/xhprof_runs.php"; }
public function __construct(callable $next, Negotiator $negotiator = null) { parent::__construct($next); $this->negotiator = $negotiator ?: new Negotiator(); }
public function __construct($app, array $options = array()) { parent::__construct($app); $this->cors = new CORSService(array_merge($this->defaultOptions, $options)); }
public function __construct(callable $next, Geocoder $geocoder = null) { parent::__construct($next); $this->geocoder = $geocoder ?: $this->createDefaultGeocoder(); }
public function __construct(callable $app, array $options = array()) { parent::__construct($app); $this->options = $options; }