Beispiel #1
0
 /**
  * Gets the request.
  *
  * @param bool $master Optional; true by default. True to returns the
  *                     master request, false means new request
  *
  * @return \Es\Http\ServerRequest The request
  */
 public function getRequest($master = true)
 {
     if (!$master) {
         return ServerRequestFactory::make();
     }
     if (!$this->request) {
         $this->request = ServerRequestFactory::make();
     }
     return $this->request;
 }
 public function testMakeCreateProtocolVersion()
 {
     $request = ServerRequestFactory::make();
     $this->assertEquals($request->getProtocolVersion(), RequestProtocolFactory::getVersion());
 }