Sons of PHP
Source Code
  • 🏠Home
  • Contributor Covenant Code of Conduct
  • Getting Help
  • Reporting Issues
  • Security Policy
  • 🪈Bard
    • Overview
    • Commands
  • Symfony Bundles
    • Feature Toggle
  • Contracts
    • Contracts Overview
    • Common
    • Cookie
    • CQRS
    • Filesystem
    • Mailer
    • Pager
    • Registry
    • State Machine
  • 📦Components
    • Assert
    • Cache
      • Adapters
      • Marshallers
    • Clock
    • Container
    • Cookie
    • CQRS
    • Event Dispatcher
    • Event Sourcing
      • Aggregates
        • Aggregate Repository
      • Event Messages
        • Using the Serializable Event Message
        • Message Enrichers
        • Message Serializers
        • Message Repository
        • Message Upcasters
    • Feature Toggle
    • Filesystem
      • Adapters
    • Http Factory
    • Http Handler
    • Http Message
    • JSON
    • Link
    • Logger
      • Handlers
      • Enrichers
      • Filters
      • Formatters
    • Mailer
      • Transports
    • Money
      • Currency Providers
      • Operators
      • Queries
    • Pager
      • Adapters
    • Registry
    • State Machine
    • Version
  • 💁Contributing
    • Contributing Overview
    • Contributing Code
    • Discussions
    • Documentation
Powered by GitBook
On this page
  • Installation
  • Messages
  • Message Handlers
  • Message Bus
  • Message Handler Provider

Was this helpful?

Edit on GitHub
  1. Contracts

CQRS

In a nut shell, with CQRS you have Commands that will change the state of your application and Queries that will return information about the state of your application.

Installation

composer require sonsofphp/cqrs-contract

Messages

Both Commands and Queries are considered Messages and are handled by Message Handlers.

Message Handlers

When a message is dispatched/handled, it is handled by a message handler.

Message Bus

The Message Bus is given a Message and will use a Message Handler to handle the message. If it's a Query Message, the bus will return a result and for Command Messages, it will not return anything.

Message Handler Provider

Returns the Handler that will handle the Message. They do not actually handle or process the message.

PreviousCookieNextFilesystem

Last updated 8 months ago

Was this helpful?