harbor / action-responder
A Responder implementation for the ADR pattern.
dev-master
2014-05-15 19:33 UTC
Requires
- php: >= 5.4
- harbor/data-container: 1.0.*
- symfony/http-foundation: 2.4.*
Requires (Dev)
- phpunit/phpunit: 4.1.*
This package is auto-updated.
Last update: 2024-12-17 08:56:13 UTC
README
Provides implementations of the Action and Responder layers of the ADR Pattern.
These are base classes, intended to be extended (in most situations).
Note: The Domain Layer of ADR is out of the scope of this package.
Action Example
This example uses a JsonAction
which uses a JsonResponder
.
<?php namespace Blog\Api\Actions; use Harbor\ActionResponder\JsonAction; class BlogListAction extends JsonAction { public function __invoke() { // Do something with your domain to get the Blog list $this->responder->articles = $articles; return $this->getResponse(); } }
Responder Example
Coming Soon...See Tests for now.