src/Rg/Markdown/Finder.php
public function getContent($path)
    {
        // only a page index was given ?
        if (('0' == $path) || (int) ($path) > 0) {
            $path = $this->findByIndex($path);
        } else {
            $path = $this->basePath . '/' . $path;
            $infos = pathinfo($path);
            // was the extension given ?
            if (empty($infos['extension'])) {
                $path .= '.md';
            }
        }
        if (file_exists($path)) {
            return file_get_contents($path);
        }

        return false;
    }
public function getContent($path)
    {
        // only a page index was given ?
        if (('0' == $path) || (int) ($path) > 0) {
            $path = $this->findByIndex($path);
        } else {
            $path = $this->basePath . '/' . $path;
            $infos = pathinfo($path);
            // was the extension given ?
            if (empty($infos['extension'])) {
                $path .= '.md';
            }
        }
        if (file_exists($path)) {
            return file_get_contents($path);
        }

        return false;
    }
public function getContent ( $ path ) { // only a page index was given ? if ( ( '0' == $ path ) || ( int ) ( $ path ) > 0 ) { $ path = $ this -> findByIndex ( $ path ) ; } else { $ path = $ this -> basePath . '/' . $ path ; $ infos = pathinfo ( $ path ) ; // was the extension given ? if ( empty ( $ infos [ 'extension' ] ) ) { $ path .= '.md' ; } } if ( file_exists ( $ path ) ) { return file_get_contents ( $ path ) ; } return false ; }
getContent
Retrieve a file content using the given path

@param string $path the markdown file path

@return mixed: false or the markdown file raw content (string)
getContent Retrieve a file content using the given path