Common\Exception\RedirectException::__construct PHP Method

__construct() public method

public __construct ( $message, Response $response, Exception $previous = null )
$response Symfony\Component\HttpFoundation\Response
$previous Exception
    public function __construct($message, Response $response, \Exception $previous = null)
    {
        $this->response = $response;
        $code = $response->getStatusCode();
        parent::__construct($message, $code, $previous);
    }

Usage Example

Example #1
0
 /**
  * @param string $message
  * @param string $html
  * @param int $statusCode
  */
 public function __construct($message, $html = null, $statusCode = Response::HTTP_OK)
 {
     parent::__construct($message, new Response($html, $statusCode));
 }