for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SfCod\SocketIoBundle\Events;
/**
* Class AbstractEvent.
*
* @author Virchenko Maksim <[email protected]>
* @package SfCod\SocketIoBundle\Events
*/
abstract class AbstractEvent implements EventInterface
{
* Please, define '@property' and use it using magic __get() method instead of using $this->payload.
* @var array
protected $payload;
* @param $data
public function setPayload($data): EventInterface
$this->payload = $data;
return $this;
}
* Magic get.
* @param $name
* @return mixed
public function __get($name)
if (isset($this->payload[$name])) {
return $this->payload[$name];
return null;