PHP Class Drahak\Restful\Application\BadRequestException

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

Public Properties

Property Type Description
$errors Some other errors appear in request

Public Methods

Method 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 method

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

gone() public static method

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
return BadRequestException

methodNotSupported() public static method

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
return BadRequestException

notFound() public static method

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

tooManyRequests() public static method

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

unauthorized() public static method

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
return BadRequestException

unprocessableEntity() public static method

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
return BadRequestException

unsupportedMediaType() public static method

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
return BadRequestException

Property Details

$errors public_oe property

Some other errors appear in request
public $errors