*/ namespace oat\taoTestTaker\models\events; use JsonSerializable; use oat\oatbox\event\Event; abstract class AbstractTestTakerEvent implements Event, JsonSerializable { /** @var string */ protected $testTakerUri; /** @var array */ protected $properties; /** * AbstractTestTakerEvent constructor. * @param $testTakerUri * @param array $properties */ public function __construct($testTakerUri, array $properties = []) { $this->testTakerUri = $testTakerUri; $this->properties = $properties; } /** * @return string */ public function getName() { return get_class($this); } /** * Specify data which should be serialized to JSON * @link http://php.net/manual/en/jsonserializable.jsonserialize.php * @return mixed data which can be serialized by json_encode, * which is a value of any type other than a resource. * @since 5.4.0 */ function jsonSerialize() { return [ 'testTakerUri' => $this->testTakerUri, ]; } /** * @return array */ public function getProperties() { return $this->properties; } }