Lavender\Cloud\Sina\View\Engines\SaeCompilerEngine::get PHP Method

get() public method

Get the evaluated contents of the view.
public get ( string $path, array $data = [] ) : string
$path string
$data array
return string
    public function get($path, array $data = array())
    {
        // If this given view has expired, which means it has simply been edited since
        // it was last compiled, we will re-compile the views so we can evaluate a
        // fresh copy of the view. We'll pass the compiler the path of the view.
        if ($this->compiler->isExpired($path)) {
            $this->compiler->compile($path);
        }
        $compiled = $this->compiler->getCompiledPath($path);
        return $this->evaluatePath($compiled, $data);
    }