Ejemplo n.º 1
0
 function __construct()
 {
     $globals = array();
     $factory = new WebFactory($globals);
     $this->response = $factory->newResponse();
     $this->response_sender = new ResponseSender($this->response);
 }
Ejemplo n.º 2
0
 function __construct()
 {
     $factory = new WebFactory(array('_ENV' => $_ENV, '_GET' => $_GET, '_POST' => $_POST, '_COOKIE' => $_COOKIE, '_SERVER' => $_SERVER));
     $this->request = $factory->newRequest();
 }
Ejemplo n.º 3
0
 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;
 }