function __construct() { $globals = array(); $factory = new WebFactory($globals); $this->response = $factory->newResponse(); $this->response_sender = new ResponseSender($this->response); }
function __construct() { $factory = new WebFactory(array('_ENV' => $_ENV, '_GET' => $_GET, '_POST' => $_POST, '_COOKIE' => $_COOKIE, '_SERVER' => $_SERVER)); $this->request = $factory->newRequest(); }
public function setResponderFactory(\Closure $factory) { $responderFactoryProxy = function ($responderName) use($factory) { $webFactory = new WebFactory($GLOBALS); $response = $webFactory->newResponse(); $responder = $factory($responderName); $responder->_setResponse($response); $responder->_init(); return $responder; }; $this->responderFactory = $responderFactoryProxy; }