public function render(string $template, array $variables = null, ArrayAccess $sections = null)
    {
        if (is_null($sections)) {
            $sections = new ArrayObject();
        }
        $renderer = new Renderer([$this, 'resolve'], $sections);
        $output = $renderer->render($template, $variables);
        return $output;
    }