for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace diecoding\aws\s3;
use diecoding\aws\s3\interfaces;
/**
* Class Bus
*
* @package diecoding\aws\s3
*/
class Bus implements interfaces\Bus
{
/** @var interfaces\HandlerResolver */
protected $resolver;
* Bus constructor.
* @param \diecoding\aws\s3\interfaces\HandlerResolver $inflector
public function __construct(interfaces\HandlerResolver $inflector)
$this->resolver = $inflector;
}
* @param \diecoding\aws\s3\interfaces\commands\Command $command
* @return mixed
public function execute(interfaces\commands\Command $command)
$handler = $this->resolver->resolve($command);
return call_user_func([$handler, 'handle'], $command);