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