CMS\Page::getContent PHP 메소드

getContent() 공개 메소드

Return file content
public getContent ( ) : string
리턴 string
    public function getContent()
    {
        if (isset($this->content)) {
            return $this->content;
        }
        // FIXME can be problem if index.php or index.latte
        if ($this->isDir()) {
            return $this->content = is_file($file = $this . '/index.html') || is_file($file = $this . '/index.md') ? file_get_contents($file) : '';
        }
        return $this->content = $this->isFile() ? file_get_contents($this->getRealPath()) : '';
    }