Provide generic Command, Event and Query implementations
nilportugues opened this issue · 0 comments
nilportugues commented
Because DTO are easy to use, but I require passing an object implementing an Interface, provide helper objects. For instance:
<?php
use NilPortugues\MessageBus\CommandBus\Contracts\Command as CommandInterface;
class Command implements CommandInterface
{
public function __get($property)
{
if (property_exists($this, $property)) {
return $this->$property;
}
}
public function __set($property, $value)
{
$this->$property = $value;
}
}