@@ -61,8 +61,9 @@ class App {
6161 * @param int $port Port to listen on. If 80, assuming production, Flash on 843 otherwise expecting Flash to be proxied through 8843
6262 * @param string $address IP address to bind to. Default is localhost/proxy only. '0.0.0.0' for any machine.
6363 * @param LoopInterface $loop Specific React\EventLoop to bind the application to. null will create one for you.
64+ * @param array $context
6465 */
65- public function __construct ($ httpHost = 'localhost ' , $ port = 8080 , $ address = '127.0.0.1 ' , LoopInterface $ loop = null ) {
66+ public function __construct ($ httpHost = 'localhost ' , $ port = 8080 , $ address = '127.0.0.1 ' , LoopInterface $ loop = null , $ context = array () ) {
6667 if (extension_loaded ('xdebug ' ) && getenv ('RATCHET_DISABLE_XDEBUG_WARN ' ) === false ) {
6768 trigger_error ('XDebug extension detected. Remember to disable this if performance testing or going live! ' , E_USER_WARNING );
6869 }
@@ -74,7 +75,7 @@ public function __construct($httpHost = 'localhost', $port = 8080, $address = '1
7475 $ this ->httpHost = $ httpHost ;
7576 $ this ->port = $ port ;
7677
77- $ socket = new Reactor ($ address . ': ' . $ port , $ loop );
78+ $ socket = new Reactor ($ address . ': ' . $ port , $ loop, $ context );
7879
7980 $ this ->routes = new RouteCollection ;
8081 $ this ->_server = new IoServer (new HttpServer (new Router (new UrlMatcher ($ this ->routes , new RequestContext ))), $ socket , $ loop );
0 commit comments