for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Jellyfish\Event;
use function array_key_exists;
class Event implements EventInterface
{
/**
* @var string
*/
protected $name;
* @var object
protected $payload;
* @var string[]
protected $metaProperties;
public function __construct()
$this->metaProperties = [];
}
* @return string
public function getName(): string
return $this->name;
* @param string $name
*
* @return \Jellyfish\Event\EventInterface
public function setName(string $name): EventInterface
$this->name = $name;
return $this;
* @return object
public function getPayload(): object
return $this->payload;
* @param object $payload
public function setPayload(object $payload): EventInterface
$this->payload = $payload;
* @return string[]
public function getMetaProperties(): array
return $this->metaProperties;
* @param string[] $metaProperties
public function setMetaProperties(array $metaProperties): EventInterface
$this->metaProperties = $metaProperties;
* @param string $key
public function getMetaProperty(string $key): ?string
if (!array_key_exists($key, $this->metaProperties)) {
return null;
return $this->metaProperties[$key];
* @param string $metaProperty
public function setMetaProperty(string $key, string $metaProperty): EventInterface
$this->metaProperties[$key] = $metaProperty;