public function generateAndRender($content, $data)
    {
        $filename = $this->generateViewFile($content);
        try {
            $rendered = $this->render($filename, $data);
        } catch (\Exception $e) {
            $this->remove($filename);
            throw $e;
        }

        $this->remove($filename);

        return $rendered;
    }
public function generateAndRender($content, $data)
    {
        $filename = $this->generateViewFile($content);
        try {
            $rendered = $this->render($filename, $data);
        } catch (\Exception $e) {
            $this->remove($filename);
            throw $e;
        }

        $this->remove($filename);

        return $rendered;
    }
public function generateAndRender ( $ content , $ data ) { $ filename = $ this -> generateViewFile ( $ content ) ; try { $ rendered = $ this -> render ( $ filename , $ data ) ; } catch ( \ Exception $ e ) { $ this -> remove ( $ filename ) ; throw $ e ; } $ this -> remove ( $ filename ) ; return $ rendered ; }
Generate a file and renderd it.

@param string $content
@param array  $data

@return string
Generate a file and renderd it .