logiek / http-status-codes
Constants enumerating the HTTP Status Codes. Based on the HTTP Status Code Registry.
Installs: 1 444
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: ^8.0|^8.1|^8.2
Requires (Dev)
- phpunit/phpunit: ^9.5|^10.0
README
Constants enumerating the HTTP Status Codes. Based on the HTTP Status Code Registry.
Installation
You can install the package via Composer:
composer require logiek/http-status-codes
Usage
use Logiek\Http\StatusCode; StatusCode::HTTP_OK; // 200 StatusCode::get(); // [100 => 'Continue', 101 => 'Switching Protocols', ...] StatusCode::getReasonPhrase(StatusCode::HTTP_OK); // OK StatusCode::getStatusCode('Not Found'); // 404
Changelog
Please see the CHANGELOG for more information about recent changes.
Testing
Run the tests with:
composer test
License
This project is open-sourced software licensed under the MIT license.