for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the fnayou/instapush-php project.
*
* Copyright (c) 2017. Aymen FNAYOU <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Fnayou\InstapushPHP\Model;
* Class Notification.
class Notification implements FromArrayInterface
{
/** @var string */
private $event;
/** @var array */
private $trackers;
* @param string $event
* @param array $trackers
public function __construct(string $event, array $trackers)
$this
->setEvent($event)
->setTrackers($trackers);
}
* @return string
public function getEvent()
return $this->event;
* @return $this
public function setEvent(string $event)
$this->event = $event;
return $this;
* @return array
public function getTrackers()
return $this->trackers;
public function setTrackers(array $trackers)
$this->trackers = $trackers;
* {@inheritdoc}
public static function fromArray(array $data)
return new static($data['event'], $data['trackers']);
public function toArray()
return [
'event' => $this->getEvent(),
'trackers' => $this->getTrackers(),
];