public function UnauthorizedHttpException::__construct

Constructor.

Parameters

string $challenge WWW-Authenticate challenge string:

string $message The internal exception message:

\Exception $previous The previous exception:

integer $code The internal exception code:

Overrides HttpException::__construct

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnauthorizedHttpException.php, line 29

Class

UnauthorizedHttpException
UnauthorizedHttpException.

Namespace

Symfony\Component\HttpKernel\Exception

Code

public function __construct($challenge, $message = null, \Exception $previous = null, $code = 0) {
  $headers = array(
    'WWW-Authenticate' => $challenge,
  );
  parent::__construct(401, $message, $previous, $headers, $code);
}