Download the PHP package gpslab/cqrs without Composer
On this page you can find all versions of the php package gpslab/cqrs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package cqrs
Short Description Infrastructure for creating CQRS applications
License MIT
Homepage https://github.com/gpslab/cqrs
Informations about the package cqrs
CQRS
Infrastructure for creating CQRS applications.
Installation
Pretty simple with Composer, run:
Command
- Simple usage
- Bus
- Handler
- Create handler
- Locator and Subscribers
- Direct binding locator
- PSR-11)
- PSR-11)
- Queue
- Pull
- Memory queue
- Memory unique queue
- Predis queue
- Predis unique queue
- Subscribe
- Executing queue
- Predis queue
- Serialize command
- Optimized serializer
- Payload serializer
- Middleware
- Payload
Simple usage commands
Commands, in the CQRS approach, are designed to change the data in the application.
For example, consider the procedure for renaming an article.
Create a command to rename:
Note
To simplify the filling of the command, you can use payload.
You can use any implementations of callable type as a command handler. We recommend using public methods of classes as handlers. For example we use Doctrine ORM.
And now we register handler and handle command.
For the asynchronous handle a command you can use CommandQueue
.
Note
To monitor the execution of commands, you can use middleware.
Query
- Simple usage
- Bus
- Handler
- Create handler
- Locator and Subscribers
- Direct binding locator
- PSR-11)
- PSR-11)
- Middleware
- Payload
- Doctrine specification query
Simple usage queries
Query, in the CQRS approach, are designed to get the data in the application.
For example, consider the procedure for get an article by identity.
Create a query:
Note
To simplify the filling of the query, you can use payload.
You can use any implementations of callable type as a query handler. We recommend using public methods of classes as handlers. For example we use Doctrine ORM.
And now we register handler and handle query.
Note
To monitor the execution of commands, you can use middleware.
License
This bundle is under the MIT license. See the complete license in the file: LICENSE