/**
  * 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);
 }
Exemplo n.º 2
0
 public function __construct($username)
 {
     parent::__construct('a username has to be unique!', 1001);
     $this->username = $username;
 }
Exemplo n.º 3
0
 public function __construct()
 {
     parent::__construct('Logged in user must be an admin', Http::STATUS_FORBIDDEN);
 }
Exemplo n.º 4
0
 public function __construct($token)
 {
     $this->token = $token;
     parent::__construct(sprintf('The token "%s" does not exist!', $token), 1005);
 }
Exemplo n.º 5
0
 public function __construct()
 {
     parent::__construct('Current user is not logged in', Http::STATUS_UNAUTHORIZED);
 }
Exemplo n.º 6
0
 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);
 }
Exemplo n.º 10
0
 public function __construct()
 {
     parent::__construct('App is not enabled', Http::STATUS_PRECONDITION_FAILED);
 }
Exemplo n.º 11
0
 public function __construct($message = 'Unknown user', $code = SecurityException::UNKNOWN_USER)
 {
     parent::__construct($message, $code);
 }
Exemplo n.º 12
0
 public function __construct()
 {
     parent::__construct('The password is missing!', 1002);
 }
Exemplo n.º 13
0
 public function __construct($message, $code = 503)
 {
     parent::__construct($message, $code);
 }