arbiter / arbiter
An Action system for Action-Domain-Responder.
Installs: 12 920
Dependents: 3
Suggesters: 0
Security: 0
Stars: 30
Watchers: 6
Forks: 1
Open Issues: 1
pkg:composer/arbiter/arbiter
Requires
- php: >=5.5.0
This package is auto-updated.
Last update: 2025-10-11 06:18:47 UTC
README
An Action system for Action-Domain-Responder.
This package is installable and PSR-4 autoloadable via Composer as arbiter/arbiter.
Alternatively, download a release or clone this repository, then map the Arbiter\ namespace to the package src/ directory.
This package requires PHP 5.5 or later; it has been tested on PHP 5.6, PHP 7, and HHVM. You should use the latest available version of PHP as a matter of principle.
To run the tests, issue composer install to install the test dependencies, then issue phpunit.
An Action value object is composed of three elements:
- 
an $inputcallable: this collects input from the incoming ServerRequestInterface and converts it to an array of parameters suitable forcall_user_func_array();
- 
a $domaincallable: this is invoked viacall_user_func_array()using the array of parameters provided by the$inputcallable; and
- 
a $respondercallable: this is invoked with the incoming ServerRequestInterface, the outgoing ResponseInterface, and the result (or "payload") returned by the$domaincallable.
Call the ActionHandler handle() method with the Action, a ServerRequestInterface, and a ResponseInterface. The ActionHandler then acts as a mediator to direct the interaction between the three callables, and returns a modified ResponseInterface.