private function getContent($file, $data = [])
    {
        $path = fixPath($file);
        if (file_exists($path)) {
            ob_start();
            //Extract variables
            extract($data);

            /** @noinspection PhpIncludeInspection */
            require $path;

            return ob_get_clean();
        } else {
            throw new Exception("View $path not found");
        }
    }
private function getContent($file, $data = [])
    {
        $path = fixPath($file);
        if (file_exists($path)) {
            ob_start();
            //Extract variables
            extract($data);

            /** @noinspection PhpIncludeInspection */
            require $path;

            return ob_get_clean();
        } else {
            throw new Exception("View $path not found");
        }
    }
private function getContent ( $ file , $ data = [ ] ) { $ path = fixPath ( $ file ) ; if ( file_exists ( $ path ) ) { ob_start ( ) ; //Extract variables extract ( $ data ) ; /** @noinspection PhpIncludeInspection */ require $ path ; return ob_get_clean ( ) ; } else { throw new Exception ( "View $path not found" ) ; } }
Get view content for the given file
@param string $file absolute path to file
@param array $data data
@return string|false
@throws Exception
Get view content for the given file