Download the PHP package starinc/abigail without Composer
On this page you can find all versions of the php package starinc/abigail. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package abigail
Abigail
Abigail is the fork from marcj/php-rest-service
, which is a simple and fast PHP microservice framework for server side
RESTful APIs.
Features
- Easy to use syntax
- Regular Expression support
- Error handling through PHP Exceptions
- Parameter validation through PHP function signature
- Can return a summary of all routes or one route through
OPTIONS
method based on PHPDoc (ifOPTIONS
is not overridden) - Support of
GET
,POST
,PUT
,DELETE
,PATCH
,HEAD
andOPTIONS
- Suppress the HTTP status code with ?_suppress_status_code=1 (for clients that have troubles with that)
- Supports ?_method=
httpMethod
as addition to the actual HTTP method. - With auto-generation through PHP's
reflection
Installation
- https://packagist.org/packages/starinc/abigail.
- More information available under https://packagist.org/.
Create a composer.json
:
then run
After the installation, you need to include the vendor/autoload.php
to make the class in your script available.
Requirements
- PHP 7.4 and above.
- PHPUnit to execute the test suite.
- Setup PATH_INFO in mod_rewrite (.htaccess) or other webserver configuration
Example config
Apache webserver
Nginx webserver
Usage Demo
Way 1. The dirty & fast
Way 2. Auto-Collection
index.php
:
MyRestApi/Admin.php
:
Generates following entry points:
Way 3. Custom rules with controller
index.php
:
MyRestApi/Admin.php
:
Responses
The response body is always an array (JSON per default) containing a status code and the actual data. If an exception has been thrown, it contains the status 500, the exception class name as error, and the message as message.
Some examples:
License
Licensed under the MIT License. See the LICENSE file for more details.
Take a look into the code, to get more information about the possibilities. It's well documented.
All versions of abigail with dependencies
ext-json Version *
ext-ctype Version *