Beispiel #1
0
 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();
 }
Beispiel #3
0
 public function __construct($app, array $options = array())
 {
     parent::__construct($app);
     $this->cors = new CORSService(array_merge($this->defaultOptions, $options));
 }
Beispiel #4
0
 public function __construct(callable $next, Geocoder $geocoder = null)
 {
     parent::__construct($next);
     $this->geocoder = $geocoder ?: $this->createDefaultGeocoder();
 }
Beispiel #5
0
 public function __construct(callable $app, array $options = array())
 {
     parent::__construct($app);
     $this->options = $options;
 }