Added context to App facade constructor
This commit is contained in:
parent
08480d1811
commit
409139fabd
@ -61,8 +61,9 @@ class App {
|
||||
* @param int $port Port to listen on. If 80, assuming production, Flash on 843 otherwise expecting Flash to be proxied through 8843
|
||||
* @param string $address IP address to bind to. Default is localhost/proxy only. '0.0.0.0' for any machine.
|
||||
* @param LoopInterface $loop Specific React\EventLoop to bind the application to. null will create one for you.
|
||||
* @param array $context
|
||||
*/
|
||||
public function __construct($httpHost = 'localhost', $port = 8080, $address = '127.0.0.1', LoopInterface $loop = null) {
|
||||
public function __construct($httpHost = 'localhost', $port = 8080, $address = '127.0.0.1', LoopInterface $loop = null, $context = array()) {
|
||||
if (extension_loaded('xdebug') && getenv('RATCHET_DISABLE_XDEBUG_WARN') === false) {
|
||||
trigger_error('XDebug extension detected. Remember to disable this if performance testing or going live!', E_USER_WARNING);
|
||||
}
|
||||
@ -74,7 +75,7 @@ class App {
|
||||
$this->httpHost = $httpHost;
|
||||
$this->port = $port;
|
||||
|
||||
$socket = new Reactor($address . ':' . $port, $loop);
|
||||
$socket = new Reactor($address . ':' . $port, $loop, $context);
|
||||
|
||||
$this->routes = new RouteCollection;
|
||||
$this->_server = new IoServer(new HttpServer(new Router(new UrlMatcher($this->routes, new RequestContext))), $socket, $loop);
|
||||
|
Loading…
Reference in New Issue
Block a user