PHP code example of componenta / cqrs-app
1. Go to this page and download the library: Download componenta/cqrs-app library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
componenta / cqrs-app example snippets
return [
new Componenta\CQRS\ConfigProvider(),
new Componenta\CQRS\App\ConfigProvider(),
];
use Componenta\CQRS\Command\Attribute\AsCommandHandler;
#[AsCommandHandler]
final readonly class PublishPostHandler
{
public function __invoke(PublishPostCommand $command): void
{
// handle command
}
}