src/Phug/Optimizer.php
public function displayFile($__pug_file, array $__pug_parameters = [])
    {
        if ($this->isExpired($__pug_file, $__pug_cache_file)) {
            if (isset($this->options['render'])) {
                call_user_func($this->options['render'], $__pug_file, $__pug_parameters, $this->options);

                return;
            }
            if (isset($this->options['renderer'])) {
                $this->options['renderer']->displayFile($__pug_file, $__pug_parameters);

                return;
            }
            if (isset($this->options['renderer_class_name'])) {
                $className = $this->options['renderer_class_name'];
                $renderer = new $className($this->options);
                $renderer->displayFile($__pug_file, $__pug_parameters);

                return;
            }
            $facade = isset($this->options['facade'])
                ? $this->options['facade']
                : static::FACADE;
            if (is_callable([$facade, 'displayFile'])) {
                $facade::displayFile($__pug_file, $__pug_parameters, $this->options);

                return;
            }

            throw new \RuntimeException(
                'No valid render method, renderer engine, renderer class or facade provided.'
            );
        }

        if (isset($this->options['shared_variables'])) {
            $__pug_parameters = array_merge($this->options['shared_variables'], $__pug_parameters);
        }
        if (isset($this->options['globals'])) {
            $__pug_parameters = array_merge($this->options['globals'], $__pug_parameters);
        }
        if (isset($this->options['self']) && $this->options['self']) {
            $self = $this->options['self'] === true ? 'self' : strval($this->options['self']);
            $__pug_parameters = [$self => $__pug_parameters];
        }

        extract($__pug_parameters);
        include $__pug_cache_file;
    }
public function displayFile($__pug_file, array $__pug_parameters = [])
    {
        if ($this->isExpired($__pug_file, $__pug_cache_file)) {
            if (isset($this->options['render'])) {
                call_user_func($this->options['render'], $__pug_file, $__pug_parameters, $this->options);

                return;
            }
            if (isset($this->options['renderer'])) {
                $this->options['renderer']->displayFile($__pug_file, $__pug_parameters);

                return;
            }
            if (isset($this->options['renderer_class_name'])) {
                $className = $this->options['renderer_class_name'];
                $renderer = new $className($this->options);
                $renderer->displayFile($__pug_file, $__pug_parameters);

                return;
            }
            $facade = isset($this->options['facade'])
                ? $this->options['facade']
                : static::FACADE;
            if (is_callable([$facade, 'displayFile'])) {
                $facade::displayFile($__pug_file, $__pug_parameters, $this->options);

                return;
            }

            throw new \RuntimeException(
                'No valid render method, renderer engine, renderer class or facade provided.'
            );
        }

        if (isset($this->options['shared_variables'])) {
            $__pug_parameters = array_merge($this->options['shared_variables'], $__pug_parameters);
        }
        if (isset($this->options['globals'])) {
            $__pug_parameters = array_merge($this->options['globals'], $__pug_parameters);
        }
        if (isset($this->options['self']) && $this->options['self']) {
            $self = $this->options['self'] === true ? 'self' : strval($this->options['self']);
            $__pug_parameters = [$self => $__pug_parameters];
        }

        extract($__pug_parameters);
        include $__pug_cache_file;
    }
Display a template.

@param string $__pug_file
@param array  $__pug_parameters