for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace GFG\Hek;
class CommandBus
{
/**
* @var Manager
*/
private $manager;
* @param Manager $manager
public function __construct(Manager $manager)
$this->manager = $manager;
}
* @return Manager
public function getManager()
return $this->manager;
* @param array $dtoData
* @return mixed
public function receive(array $dtoData)
$context = $this->getManager()->getContextManager()->rebuild(
$dtoData,
$this->getManager()->getContextManager()->getHydrator()
);
$explode = explode('.', $context->getName());
$action = end($explode);
$service = $this->getManager()->getServiceFactory()->build($context);
return $service->$action($context);
* @param Interfaces\Context $context
public function send(Interfaces\Context $context)
return $this->getManager()->getApiClient()->execute($context);