https://github.com/n1215/simple-adr
A PSR-15 / PSR-17 compatible simple Action-Domain-Responder pattern example with no framework.
https://github.com/n1215/simple-adr
action-domain-responder adr psr-15 psr-17 psr-7
Last synced: 5 months ago
JSON representation
A PSR-15 / PSR-17 compatible simple Action-Domain-Responder pattern example with no framework.
- Host: GitHub
- URL: https://github.com/n1215/simple-adr
- Owner: n1215
- License: mit
- Created: 2017-06-11T06:03:51.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-01-11T11:28:39.000Z (over 6 years ago)
- Last Synced: 2025-10-09T01:20:41.725Z (8 months ago)
- Topics: action-domain-responder, adr, psr-15, psr-17, psr-7
- Language: PHP
- Homepage:
- Size: 15.6 KB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SimpleAdr
[](https://packagist.org/packages/n1215/simple-adr)
[](https://packagist.org/packages/n1215/simple-adr)
[](https://scrutinizer-ci.com/g/n1215/simple-adr/build-status/master)
[](https://scrutinizer-ci.com/g/n1215/simple-adr/?branch=master)
[](https://scrutinizer-ci.com/g/n1215/simple-adr/?branch=master)
A dead simple [Action-Domain-Responder pattern](https://github.com/pmjones/adr) example with no framework.
Compatible with [PSR-15 HTTP Server Request Handlers](https://www.php-fig.org/psr/psr-15/) and [PSR-17 HTTP Factories](https://www.php-fig.org/psr/psr-17/).
# Usage
## Install
```
composer create-project n1215/simple-adr
```
## Start server
```
cd simple-adr
php -S localhost:8000 -t public
```
and access
- http://localhost:8000/?id=1
- http://localhost:8000/?id=2
- http://localhost:8000/?id=3
## Directory structure
- entry point: [public/index.php](public/index.php)
- Action: [\N1215\SimpleAdr\Action\UserShowAction](src/Action/UserShowAction.php)
- Domain: [\N1215\SimpleAdr\Domain\UserShowUseCase](src/Domain/UserShowUseCase.php)
- Responder: [\N1215\SimpleAdr\Responder\UserShowJsonResponder](src/Responder/UserShowJsonResponder.php)
# License
The MIT License (MIT). Please see [LICENSE](LICENSE) for more information.