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;
* Model Application.
class Application implements FromArrayInterface
{
/** @var string */
private $title;
private $appId;
private $appSecret;
* @param string $title
* @param string $appId
* @param string $appSecret
public function __construct(
string $title,
string $appId = null,
string $appSecret = null
) {
$this
->setTitle($title)
->setAppId($appId)
->setAppSecret($appSecret);
}
* @return string
public function getTitle()
return $this->title;
* @return $this
public function setTitle(string $title)
$this->title = $title;
return $this;
public function getAppId()
return $this->appId;
public function setAppId(string $appId = null)
$this->appId = $appId;
public function getAppSecret()
return $this->appSecret;
public function setAppSecret(string $appSecret = null)
$this->appSecret = $appSecret;
* {@inheritdoc}
public static function fromArray(array $data)
return new static(
$data['title'],
$data['appID'],
$data['appSecret']
);
* @return array
public function toArray()
return [
'title' => $this->getTitle(),
'appID' => $this->getAppId(),
'appSecret' => $this->getAppSecret(),
];