/** * UserNotFoundException constructor. * @param null $name */ public function __construct($name = null) { if ($name === null) { parent::__construct(sprintf('User not found.', $name)); return; } parent::__construct(sprintf('User "%s" not found.', $name)); }
/** * Constructs the exception to handle a CAPTCHA required response. * * @param string $captchaToken The CAPTCHA token ID provided by the server. * @param string $captchaUrl The URL to the CAPTCHA challenge image. */ public function __construct($captchaToken, $captchaUrl) { $this->captchaToken = $captchaToken; $this->captchaUrl = self::ACCOUNTS_URL . $captchaUrl; parent::__construct('CAPTCHA challenge issued by server'); }
/** * RoleExistsException constructor. * @param string $name */ public function __construct($name) { parent::__construct(sprintf('Role "%s" already exists.', $name)); }
/** * RoleNotFoundException constructor. * @param string $name */ public function __construct($name) { parent::__construct(sprintf('Role "%s" not found.', $name)); }
public function __construct($message = 'No authentication token was specified', $code = 0, \Exception $previous = null) { parent::__construct($message, $code, $previous); }
/** * PermissionDenied constructor. * @param User $user * @param int $route */ public function __construct(User $user, $route) { parent::__construct(sprintf('User "%s" does not have permission for "%s" route.', $user->getUsername(), $route)); }
/** * InvalidRouteException constructor. */ public function __construct() { parent::__construct(sprintf('Route "name" is not presented')); }
/** * Public constructor. */ public function __construct() { $message = 'You must authenticate to access this resource.'; $code = 401; parent::__construct($message, $code); }
public function __construct(array $missing_factors) { parent::__construct(); // TODO this $this->missing_factors = $missing_factors; }
public function __construct($message = 'The token being used is invalid', $code = 0, \Exception $previous = null) { parent::__construct($message, $code, $previous); }
/** * Public constructor. */ public function __construct() { $message = 'You are not authorized to access this resource'; $code = 403; parent::__construct($message, $code); }