oms-Knowledgebase/Models/WikiApp.php

100 lines
1.6 KiB
PHP

<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package Modules\Knowledgebase\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace Modules\Knowledgebase\Models;
/**
* Wiki app class.
*
* @package Modules\Knowledgebase\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class WikiApp implements \JsonSerializable
{
/**
* ID.
*
* @var int
* @since 1.0.0
*/
protected int $id = 0;
/**
* Application name.
*
* @var string
* @since 1.0.0
*/
protected string $name = '';
/**
* Get id.
*
* @return int Model id
*
* @since 1.0.0
*/
public function getId() : int
{
return $this->id;
}
/**
* Set the name.
*
* @param string $name Name of the app
*
* @return void
*
* @since 1.0.0
*/
public function setName(string $name) : void
{
$this->name = $name;
}
/**
* Get the app name
*
* @return string
*
* @since 1.0.0
*/
public function getName() : string
{
return $this->name;
}
/**
* {@inheritdoc}
*/
public function toArray() : array
{
return [
'id' => $this->id,
'name' => $this->name,
];
}
/**
* {@inheritdoc}
*/
public function jsonSerialize()
{
return $this->toArray();
}
}