daux.io/libs/Tree/Content.php

30 lines
487 B
PHP

<?php namespace Todaymade\Daux\Tree;
class Content extends Entry
{
/**
* @var string
*/
protected $content;
/**
* @return string
*/
public function getContent()
{
if (!$this->content) {
$this->content = file_get_contents($this->getPath());
}
return $this->content;
}
/**
* @param string $content
*/
public function setContent($content)
{
$this->content = $content;
}
}