/** * Constructs a unauthorized exception * @param string $message The message of the exception * @param integer $code Code of the exception * @param Exception $previous Previous exception which caused this exception * @return null */ public function __construct($message = null, $code = null, Exception $previous = null) { if ($code === null) { $code = 202; } parent::__construct($message, $code, $previous); }
public function __construct($username) { parent::__construct('a username has to be unique!', 1001); $this->username = $username; }
public function __construct() { parent::__construct('Logged in user must be an admin', Http::STATUS_FORBIDDEN); }
public function __construct($token) { $this->token = $token; parent::__construct(sprintf('The token "%s" does not exist!', $token), 1005); }
public function __construct() { parent::__construct('Current user is not logged in', Http::STATUS_UNAUTHORIZED); }
public function __construct($email) { $this->email = $email; parent::__construct(sprintf('The email "%s" is not unique!', $email), 1004); }
public function __construct() { parent::__construct('CSRF check failed', Http::STATUS_PRECONDITION_FAILED); }
public function __construct($interval) { parent::__construct('a token has already been generated', 1003); $this->interval = $interval; }
/** * Construct this exception * @param string $error Error message * @param string $translationKey Translation key of the error message * @param string $field Name of the field which caused this exception (optional) * @return null */ public function __construct($error, $translationKey, $field = null) { parent::__construct($error, 201); $this->setTranslationKey($translationKey); $this->setField($field); }
public function __construct() { parent::__construct('App is not enabled', Http::STATUS_PRECONDITION_FAILED); }
public function __construct($message = 'Unknown user', $code = SecurityException::UNKNOWN_USER) { parent::__construct($message, $code); }
public function __construct() { parent::__construct('The password is missing!', 1002); }
public function __construct($message, $code = 503) { parent::__construct($message, $code); }