コード例 #1
0
ファイル: Redirector.php プロジェクト: pleonasm/bsg
 /**
  * @param Request $request
  * @param Response $response
  */
 public function __construct(Request $request, Response $response)
 {
     $this->scheme = $request->getScheme();
     $this->host = $request->getHost();
     $port = $request->getPort();
     $this->response = $response;
     if ('http' === $this->scheme && 80 !== $port) {
         $this->host .= ':' . $port;
     }
     if ('https' === $this->scheme && 443 !== $port) {
         $this->host .= ':' . $port;
     }
 }