PHP code example of ipresence / domain_events
1. Go to this page and download the library: Download ipresence/domain_events 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/ */
ipresence / domain_events example snippets
$publisher = PublisherBuilder::create()->withYamlConfig('domain_events.yaml')->build();
$listener = ListenerBuilder::create()->withYamlConfig('domain_events.yaml')->build();
$publisher->add($yourDomainEvent);
$publisher->publish();
$listener->subscribe(new YourDomainEventSubscriber());
$listener->listen();
$publisher = PublisherBuilder::create()
->withYamlConfig('domain_events.yaml')
->build();
$publisher->add($yourDomainEvent);
$publisher->publish();
$listener = ListenerBuilder::create()
->withYamlConfig('domain_events.yaml')
->build();
$listener->subscribe(new YourDomainEventSubscriber());
$listener->listen();
ListenerBuilder::create()
->withYamlConfig('domain_events.yaml')
->withLogger($psr3Logger)
->build();
ListenerBuilder::create()
->withYamlConfig('domain_events.yaml')
->withMonitor($monitor)
->build();
bash
composer
bash
composer
bash
make unit PHP_VERSION=7.3