8
0

Code Style and documentation

Dieser Commit ist enthalten in:
Stéphane Goetz
2015-07-17 23:38:06 +02:00
Ursprung e7afd9aa28
Commit 4f8d817365
22 geänderte Dateien mit 415 neuen und 177 gelöschten Zeilen

Datei anzeigen

@ -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'];