for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Subreality\Dilmun\Kishar;
use Subreality\Dilmun\LoggedClassTrait;
/**
* Class Page
* @package Subreality\Dilmun\Kishar
*/
class Page
{
use LoggedClassTrait;
protected $contents;
* Sets the Page's contents to the contents of a file
*
* @param string $contents The path to the file containing the page's contents
* @return bool Returns true if the file exists
* Returls false if the file does not exist
public function setContents($contents)
$contents_exist = file_exists($contents);
if ($contents_exist) {
$this->contents = file_get_contents($contents);
} else {
$this->contents = false;
}
return $contents_exist;
* Echos the contents of a supplied page file
* @return void
public function displayPage()
echo $this->contents;