public function renderString($input, array $vars = [], $filename = null)
    {
        $fallback = function () use ($input, $vars, $filename) {
            return $this->renderWithPhp($input, $vars, $filename);
        };

        if ($this->getDefaultOption('pugjs')) {
            return $this->renderWithJs($input, $filename, $vars, $fallback);
        }

        return call_user_func($fallback);
    }
public function renderString($input, array $vars = [], $filename = null)
    {
        $fallback = function () use ($input, $vars, $filename) {
            return $this->renderWithPhp($input, $vars, $filename);
        };

        if ($this->getDefaultOption('pugjs')) {
            return $this->renderWithJs($input, $filename, $vars, $fallback);
        }

        return call_user_func($fallback);
    }
public function renderString ( $ input , array $ vars = [ ] , $ filename = null ) { $ fallback = function ( ) use ( $ input , $ vars , $ filename ) { return $ this -> renderWithPhp ( $ input , $ vars , $ filename ) ; } ; if ( $ this -> getDefaultOption ( 'pugjs' ) ) { return $ this -> renderWithJs ( $ input , $ filename , $ vars , $ fallback ) ; } return call_user_func ( $ fallback ) ; }
Render HTML code from a Pug input string.

@param string $input    pug input string
@param array  $vars     to pass to the view
@param string $filename optional file path

@throws \Exception

@return string
Render HTML code from a Pug input string .