| Recommend this page to a friend! |
| Info | Documentation | Reputation | Support forum | Blog | Links |
| Ratings | Unique User Downloads | Download Rankings | ||||
| Not enough user ratings | Total: 63 | All time: 10,443 This week: 57 | ||||
| Version | License | PHP version | Categories | |||
| http-status-class 1.0 | Shareware | 5 | HTTP, PHP 5 |
| Description | Author | |||||||||||||||||||||||
This package can return HTTP status codes and their descriptions. |
| |||||||||||||||||||||||
Enums of all official http status codes and their descriptions.
composer require ahmard/http-status-codes
<?php
require __DIR__ . '/vendor/autoload.php';
$sc = \HttpStatusCodes\StatusCode::CREATED;
// Get Status Code => "201"
$sc->value;
$desc = $sc->describe();
// Get Status Code => "201"
$desc->code;
// Get Status Code Title => "Created"
$desc->title;
You can also get description of a given status code, the description is copied from Wikipedia.
<?php
$sc = \HttpStatusCodes\StatusCode::CREATED;
// Get Description => "The request has been fulfilled, resulting in the creation of a new resource."
$sc->describe()->desc;
| File | Role | Description | ||
|---|---|---|---|---|
| Data | Auxiliary data | |||
| Lic. | License text | |||
| Doc. | Read me | |||
| / | src |
| File | Role | Description |
|---|---|---|
| |
Class | Class source |
| |
Aux. | Auxiliary script |
| |
Class | Class source |
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
| Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
| 100% |
|
|
| Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.