for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Lichtenwallner (https://lichtenwallner.at)
*
* @see https://github.com/jolicht/markdown-cms for the canonical source repository
* @license https://github.com/jolicht/markdown-cms/blob/master/LICENSE MIT
* @copyright Copyright (c) Johannes Lichtenwallner
*/
declare(strict_types = 1);
namespace Jolicht\MarkdownCms\ContentType;
* Content Type Page
class Page
{
* Id
* @var string
private $id;
* Title
private $title;
* Date created
* @var \DateTime
private $created;
* Date updated
private $updated;
* Is draft
* @var boolean
private $draft;
public function __construct(string $id, string $title, \DateTime $created, \DateTime $updated, bool $draft)
$this->id = $id;
$this->title = $title;
$this->created = $created;
$this->updated = $updated;
$this->draft = $draft;
}
* Get id
* @return string
public function getId() : string
return $this->id;
* Get title
public function getTitle() : string
return $this->title;
* Get date created
* @return \DateTime
public function getCreated() : \DateTime
return $this->created;
* Get date updated
public function getUpdated() : \DateTime
return $this->updated;
* @return boolean
public function isDraft(): bool
return $this->draft;