PHP Class Drahak\Restful\Application\BadRequestException

Author: Drahomír Hanák
Inheritance: extends Nette\Application\BadRequestException
Afficher le fichier Open project: drahak/restful Class Usage Examples

Méthodes publiques

Свойство Type Description
$errors Some other errors appear in request

Méthodes publiques

Méthode Description
forbidden ( string $message = '', Exception | Throwable $previous = NULL ) : BadRequestException Is thrown when access to this resource is forbidden
gone ( string $message = '', Exception | Throwable $previous = NULL ) : BadRequestException Is thrown when this resource is not no longer available (e.g. with new API version)
methodNotSupported ( string $message = '', Exception | Throwable $previous = NULL ) : BadRequestException Is thrown when request method (e.g. POST or PUT) is not allowed for this resource
notFound ( string $message = '', Exception | Throwable $previous = NULL ) : BadRequestException Is thrown when resource's not found
tooManyRequests ( string $message = '', Exception | Throwable $previous = NULL ) : BadRequestException Is thrown to reject request due to rate limiting
unauthorized ( string $message = '', Exception | Throwable $previous = NULL ) : BadRequestException Is thrown when trying to reach secured resource without authentication
unprocessableEntity ( array $errors, string $message = '', Exception | Throwable $previous = NULL ) : BadRequestException Is thrown when validation problem appears
unsupportedMediaType ( string $message = '', Exception | Throwable $previous = NULL ) : BadRequestException Is thrown when incorrect (or unknown) Content-Type was provided in request

Method Details

forbidden() public static méthode

Is thrown when access to this resource is forbidden
public static forbidden ( string $message = '', Exception | Throwable $previous = NULL ) : BadRequestException
$message string
$previous Exception | Throwable
Résultat BadRequestException

gone() public static méthode

Is thrown when this resource is not no longer available (e.g. with new API version)
public static gone ( string $message = '', Exception | Throwable $previous = NULL ) : BadRequestException
$message string
$previous Exception | Throwable
Résultat BadRequestException

methodNotSupported() public static méthode

Is thrown when request method (e.g. POST or PUT) is not allowed for this resource
public static methodNotSupported ( string $message = '', Exception | Throwable $previous = NULL ) : BadRequestException
$message string
$previous Exception | Throwable
Résultat BadRequestException

notFound() public static méthode

Is thrown when resource's not found
public static notFound ( string $message = '', Exception | Throwable $previous = NULL ) : BadRequestException
$message string
$previous Exception | Throwable
Résultat BadRequestException

tooManyRequests() public static méthode

Is thrown to reject request due to rate limiting
public static tooManyRequests ( string $message = '', Exception | Throwable $previous = NULL ) : BadRequestException
$message string
$previous Exception | Throwable
Résultat BadRequestException

unauthorized() public static méthode

Is thrown when trying to reach secured resource without authentication
public static unauthorized ( string $message = '', Exception | Throwable $previous = NULL ) : BadRequestException
$message string
$previous Exception | Throwable
Résultat BadRequestException

unprocessableEntity() public static méthode

Is thrown when validation problem appears
public static unprocessableEntity ( array $errors, string $message = '', Exception | Throwable $previous = NULL ) : BadRequestException
$errors array during validation
$message string
$previous Exception | Throwable
Résultat BadRequestException

unsupportedMediaType() public static méthode

Is thrown when incorrect (or unknown) Content-Type was provided in request
public static unsupportedMediaType ( string $message = '', Exception | Throwable $previous = NULL ) : BadRequestException
$message string
$previous Exception | Throwable
Résultat BadRequestException

Property Details

$errors public_oe property

Some other errors appear in request
public $errors