public function draw()
    {
        $file = Application::current()->getDirectory();
        $file .= "views/{$this->templateName}.";
        $file .= self::$extension;

        if (!file_exists($file)) {
            throw new Exception("Template file not found: $file");
        }

        return $this->templateEngine->draw(
            $file, $this->data
        );
    }
public function draw()
    {
        $file = Application::current()->getDirectory();
        $file .= "views/{$this->templateName}.";
        $file .= self::$extension;

        if (!file_exists($file)) {
            throw new Exception("Template file not found: $file");
        }

        return $this->templateEngine->draw(
            $file, $this->data
        );
    }
public function draw ( ) { $ file = Application :: current ( ) -> getDirectory ( ) ; $ file .= "views/{$this->templateName}." ; $ file .= self :: $ extension ; if ( ! file_exists ( $ file ) ) { throw new Exception ( "Template file not found: $file" ) ; } return $ this -> templateEngine -> draw ( $ file , $ this -> data ) ; }
Draw a template using application defined
template engine.

@throws \Exception

@return string
Draw a template using application defined template engine .