reliv / pipe-rat
Create REST APIs with just a few lines of config. This PSR7 compliant PHP library uses Zend\Stragility Middleware at its core.
Installs: 1 780
Dependents: 4
Suggesters: 0
Security: 0
Stars: 3
Watchers: 10
Forks: 2
Open Issues: 0
Requires
- php: >=5.5
- reliv/zf-config-factories: 3.* || 4.*
- zendframework/zend-inputfilter: >=2
- zendframework/zend-stratigility: 2.*
Requires (Dev)
- phpunit/phpunit: ~5.6
Suggests
- rcm/user: rcm/user for user and ACL
- reliv/zf-input-filter-service: reliv/zf-input-filter-service for input filtering with services
This package is auto-updated.
Last update: 2024-11-06 02:08:18 UTC
README
Create REST APIs with just a few lines of config. This PSR7 compliant PHP library that uses Zend\Stragility Middleware at its core.
@todo Docs
-
There is a name collision happening when pre and|or post service options have the same name I.E.: responseHeaders in this example, looses the postServiceOptions values in the 'findById'
'xxx' => [ 'controllerServiceName' => 'Reliv\PipeRat\Middleware\ResourceController\DoctrineResourceController', 'controllerServiceOptions' => [ 'entity' => null, ], 'methods' => [ 'findById' => [ 'postServiceNames' => [ 'extractor' => 'Reliv\PipeRat\Middleware\Extractor\PropertyGetterExtractor', 'responseHeaders' => 'Reliv\PipeRat\Middleware\Header\AddResponseHeaders', ], 'postServiceOptions' => [ 'responseHeaders' => [ 'headers' => [ 'My' => 'header' ] ] ], ], ], 'preServiceOptions' => [ ], 'preServicePriority' => [ // 'JsonRequestFormat' => 1000, ], 'postServiceNames' => [ 'responseHeaders' => 'Reliv\PipeRat\Middleware\Header\AddResponseHeaders', 'JsonResponseFormat' => 'Reliv\PipeRat\Middleware\ResponseFormat\JsonResponseFormat', 'XmlResponseFormat' => 'Reliv\PipeRat\Middleware\ResponseFormat\XmlResponseFormat', 'DefaultResponseFormat' => 'Reliv\PipeRat\Middleware\ResponseFormat\JsonResponseFormat', ], 'postServiceOptions' => [ 'DefaultResponseFormat' => [ 'accepts' => [ '*/*' ], ], ], ]