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\Markdown;
* Markdown document
* providing yaml params and content of markdown document
class MarkdownDocument
{
* Params
* @var array
private $params;
* Content
* @var string
private $content;
* Constructor
* @param array $params
* @param string $content
public function __construct(array $params, string $content)
$this->params = $params;
$this->content = $content;
}
* Get params
* @return array
public function getParams() : array
return $this->params;
* Get param
* @param string $key
* @return mixed
public function getParam($key, $default = null)
if (isset($this->params[$key])) {
return $this->params[$key];
return $default;
* Get content
* @return string
public function getContent() : string
return $this->content;