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;
abstract class AbstractContentType
{
* Id
* @var string
private $id;
* Title
private $title;
* Content
private $content;
* Date created
* @var \DateTime
private $created;
* Date updated
private $updated;
* Is draft
* @var boolean
private $draft;
* Template
private $template;
* Constructor
* @param string $id
* @param string $title
* @param string $content
* @param \DateTime $created
* @param \DateTime $updated
* @param bool $draft
* @param string $template
public function __construct(string $id, string $title, string $content, \DateTime $created, \DateTime $updated,
bool $draft, string $template)
$this->id = $id;
$this->title = $title;
$this->content = $content;
$this->created = $created;
$this->updated = $updated;
$this->draft = $draft;
$this->template = $template;
}
* Get id
* @return string
public function getId(): string
return $this->id;
* Get title
public function getTitle(): string
return $this->title;
* Get content
public function getContent(): string
return $this->content;
* 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;
* Get template
public function getTemplate() : string
return $this->template;
* Get type
abstract public function getType() : string;