Download the PHP package zored/speech without Composer
On this page you can find all versions of the php package zored/speech. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Vendor zored
Package speech
Short Description JSON-RPC 2.0 for PHP. With Symfony 2.0 to 3.0 support.
License MIT
Homepage http://github.com/zored/speech
Package speech
Short Description JSON-RPC 2.0 for PHP. With Symfony 2.0 to 3.0 support.
License MIT
Homepage http://github.com/zored/speech
Please rate this library. Is it a good library?
Informations about the package speech
Speech
JSON-RPC 2.0 for PHP
Bundle for JSON-RPC 2.0. You can use as standalone library. Or with Symfony.
Features
- Validation. Based on Symfony Validator component.
- Deserialization. Based on JMS.
- Customization. Change your rules for JSON-RPC 2.0.
Use
Symfony
- Install package:
composer require zored/speech
. - Add bundle
new Zored\SpeechBundle\ZoredSpeechBundle()
to your Symfony kernelapp/AppKernel.php
. -
Add route to default endpoint:
routing.yml
: -
Add service with your JSON-RPC methods in
services.yml
: -
Allow this service to run in default controller via
parameters.yml
: - Clear caches.
- Test:
Standalone library
- See example in
web/index.php
- Run there server with
php -S 127.0.0.1:8080
- Test:
What's next?
- See default controller if you need multiple JSON-RPC endpoints.
- See tests to know how it works.
Inside
- Your request JSON string goes to endpoint which handles it and returns Symfony response.
- Endpoint chooses which request passer can pass JSON string to request handler.
- There are batch for
[{},{}]
passers enabled by default.
- There are batch for
- Request passer also deserializes JSON to object and validates it.
- Request passer passes request object to request handler that pushes request somewhere to get response.
- Now service handler is used to:
- Deserialize request
params
if set with parameter converter. - Call public method of service with these params. Services are restricted with
ServiceContext
. For default controller seezored.speech.controller.context
parameter. - Wait for
array
orAbstractResponse
.
- Deserialize request
- Now service handler is used to:
- Request then passed back and serialized to array.
Events
You can see available events here.
All versions of speech with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.6
jms/serializer-bundle Version ~1.0
symfony/validator Version ~2.0|~3.0
symfony/dependency-injection Version ~2.8|~3.0
symfony/event-dispatcher Version ~2.3|~3.0
symfony/property-info Version ~2.8|~3.0
jms/serializer-bundle Version ~1.0
symfony/validator Version ~2.0|~3.0
symfony/dependency-injection Version ~2.8|~3.0
symfony/event-dispatcher Version ~2.3|~3.0
symfony/property-info Version ~2.8|~3.0
The package zored/speech contains the following files
Loading the files please wait ....