public function render(string $template, array $variables = null): string
    {
        list($path__, $env__) = call_user_func($this->resolve, $template, $variables);
        
        $renderer = $this;
        unset($template, $variables);
        extract($env__);
        ob_start();
        require($path__);
        $output = ob_get_clean();

        if ($this->next) {
            // wrapper has been specified. Then continue wrapper with current output.
            list($template, $variables) = $this->next;
            $next = new Renderer($this->resolve, $this->sections, $output);
            return $next->render($template, $variables);
        } else {
            return $output;
        }
    }