PHPackages                             ignislabs/flare-cqrs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ignislabs/flare-cqrs

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ignislabs/flare-cqrs
====================

Flare is a small and easy to use CQRS library.

1.0.0(8y ago)218MITPHPPHP &gt;=7.1

Since Jan 22Pushed 8y ago1 watchersCompare

[ Source](https://github.com/IgnisLabs/FlareCQRS)[ Packagist](https://packagist.org/packages/ignislabs/flare-cqrs)[ RSS](/packages/ignislabs-flare-cqrs/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (2)Versions (8)Used By (0)

Flare CQRS
==========

[](#flare-cqrs)

Flare is a small and easy to use CQRS library.
It drives CQRS by making use of the message bus pattern, separating Queries (interrogatory messages) from Commands (imperative messages).

This library was greatly inspired by [Messaging Flavours](http://verraes.net/2015/01/messaging-flavours/) article by Mathias Verraes.

What is CQRS?
-------------

[](#what-is-cqrs)

Originated with Bertrand Meyer's *Command and Query Separation* principle (CQS):

> It states that every method should either be a command that performs an action, or a query that returns data to the caller, but not both. In other words, asking a question should not change the answer. More formally, methods should return a value only if they are referentially transparent and hence possess no side effects.

So, *Command and Query Responsibility Segregation* (CQRS):

> ... applies the CQS principle by using separate Query and Command objects to retrieve and modify data, respectively.

Source: [Wikipedia](https://en.wikipedia.org/wiki/Command%E2%80%93query_separation)

Installation
------------

[](#installation)

Through composer:

```
$ composer require ignislabs/flare-cqrs
```

Usage
-----

[](#usage)

FlareCQRS is framework-agnostic, but it's really easy to bootstrap and use.

### Bootstrapping

[](#bootstrapping)

```
