Code Style and documentation
Dieser Commit ist enthalten in:
@ -4,7 +4,10 @@ use Todaymade\Daux\DauxHelper;
|
||||
|
||||
class Content extends Entry
|
||||
{
|
||||
protected $content;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $content;
|
||||
|
||||
public function __construct($path = '', $parents = array())
|
||||
{
|
||||
@ -12,21 +15,31 @@ class Content extends Entry
|
||||
|
||||
$this->value = $this->uri;
|
||||
}
|
||||
|
||||
public function getContent()
|
||||
{
|
||||
if (!$this->content) {
|
||||
$this->content = file_get_contents($this->getPath());
|
||||
}
|
||||
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
public function setContent($content)
|
||||
{
|
||||
$this->content = $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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $file
|
||||
* @return string
|
||||
*/
|
||||
protected function getFilename($file)
|
||||
{
|
||||
return DauxHelper::pathinfo($file)['filename'];
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren