1. Go to this page and download the library: Download malocher/zf2-cqrs-module 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/ */
namespace My\Controller;
use Zend\Mvc\Controller\AbstractActionController;
use My\Command\AddEntityCommand;
use My\Bus\DomainBus;
class MyController extends AbstractActionController {
public function addEntityAction() {
$entityName = $this->getEvent()->getRouteMatch()->getParam('entityname');
$addEntityCommand = new AddEntityCommand();
$addEntityCommand->setName($entityName);
$this->getServiceLocator()
->get('malocher.cqrs.gate')
->getBus(DomainBus::NAME)
->invokeCommand($addEntityCommand);
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.