-
Quick start
-
The basics
-
Helper classes
- Benchmark Class
- Cache Class
- Captcha Class
- cURL Class
- Database Class
- Date Class
- Errors Class
- FileSystem Class
- FTP Class
- Images Class
- Language Class
- Logger Class
- Number Class
- PayPal Class
- PHPMailer Class
- Plugins Class
- RestClient Class
- Security Class
- Template Class
- Text Class
- URL Class
- XML Class
- ZIP Class
Errors class
The following sections explain each method of the class.
createException
public static void createException ( string $message)
Creates an \Exception
error message in the PHP parser.
Parameter list
message
The message to be generated when the \Exception
should be triggered.
create_error
public static void create_error ( int $errorCode, string $httpVersion = '1.1')
Creates an HTTP header.
Parameter list
errorCode
The HTTP status code (HTTP 1.1) to be generated. The following HTTP status codes are allowed:
Information
100
- Continue101
- Switching Protocols102
- Processing
Successful operation
200
- OK201
- Created202
- Accepted203
- Non-Authoritative Information204
- No Content205
- Reset Content206
- Parital Content207
- Multi-Status208
- Already Reported226
- IM Used
Detour
300
- Multiple Choices301
- Moved Permanently302
- Found303
- See Other304
- Not Modified305
- Use Proxy307
- Temporary Redirect308
- Permanent Redirect
Client Error
400
- Bad Request401
- Unauthorized402
- Payment Required403
- Forbidden404
- Not Found405
- Method Not Allowed406
- Not Acceptable407
- Proxy Authentication Required408
- Request Timeout409
- Conflict410
- Gone411
- Length Required412
- Precondition Failed413
- Request Entity Too Large414
- Request-URI Too Long415
- Unsupported Media Type416
- Requested Range Not Satisfiable417
- Expectation Failed418
- I’m a teapot420
- Policy Not Fulfilled421
- Misdirected Request (eingeführt mit HTTP/2.0422
- Unprocessable Entity423
- Locked424
- Failed Dependency425
- Unordered Collection426
- Upgrade Required428
- Precondition Required429
- Too Many Requests431
- Request Header Fields Too Large444
- No Response449
- The request should be retried after doing the appropriate action451
- Unavailable For Legal Reasons
Server Error
500
- Internal Server Error501
- Not Implemented502
- Bad Gateway503
- Service Unavailable504
- Gateway Timeout505
- HTTP Version Not Supported506
- Variant Also Negotiates507
- Insufficient Storage508
- Loop Detected509
- Bandwidth Limit Exceeded510
- Not Extended
httpVersion
To specifies which HTTP version when sending the header used. By default, 1.1