public function readFileFunc($filepath)
    {
        /** @var UniformResourceLocator $locator */
        $locator = $this->grav['locator'];

        if ($locator->isStream($filepath)) {
            $filepath = $locator->findResource($filepath);
        }

        if ($filepath && file_exists($filepath)) {
            return file_get_contents($filepath);
        }

        return false;
    }
public function readFileFunc($filepath)
    {
        /** @var UniformResourceLocator $locator */
        $locator = $this->grav['locator'];

        if ($locator->isStream($filepath)) {
            $filepath = $locator->findResource($filepath);
        }

        if ($filepath && file_exists($filepath)) {
            return file_get_contents($filepath);
        }

        return false;
    }
public function readFileFunc ( $ filepath ) { /** @var UniformResourceLocator $locator */ $ locator = $ this -> grav [ 'locator' ] ; if ( $ locator -> isStream ( $ filepath ) ) { $ filepath = $ locator -> findResource ( $ filepath ) ; } if ( $ filepath && file_exists ( $ filepath ) ) { return file_get_contents ( $ filepath ) ; } return false ; }
Simple function to read a file based on a filepath and output it

@param string $filepath
@return bool|string
Simple function to read a file based on a filepath and output it