Skip to content

Instantly share code, notes, and snippets.

@ArchTaqi
Created July 8, 2019 14:11
Show Gist options
  • Save ArchTaqi/6ce269794f3ef7776084163d9461cc59 to your computer and use it in GitHub Desktop.
Save ArchTaqi/6ce269794f3ef7776084163d9461cc59 to your computer and use it in GitHub Desktop.
<?php declare(strict_types=1);
namespace App\Event;
use Symfony\Contracts\EventDispatcher\Event;
/**
* Class RepositoryEvent
* @package App\Event
*/
class RepositoryEvent extends Event
{
/**
* Collection of entities or single entity
* @var
*/
protected $data;
/**
* @var null
*/
protected $action;
/**
* RepositoryEvent constructor.
* @param object $data
* @param null $action
*/
function __construct($data, $action = null)
{
$this->data = $data;
$this->action = $action;
}
/**
* @return mixed
*/
public function getData()
{
return $this->data;
}
/**
* @param mixed $data
*/
public function setData($data)
{
$this->data = $data;
}
/**
* @return null
*/
public function getAction()
{
return $this->action;
}
/**
* @param null $action
*/
public function setAction($action)
{
$this->action = $action;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment