Created
July 8, 2019 14:11
-
-
Save ArchTaqi/6ce269794f3ef7776084163d9461cc59 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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