public function boot(Container $container)
    {
        $container['events']->on('f.template.prerender',
            function (Template $template) use ($container) {
                if ($container['context']->accept($template->path())) {
                    $template->setData($container['context']->provide());
                    $container['context']->disallow();
                }
            });

        $container['events']->on('f.engine.call', function ($func, array $args) use ($container) {
            switch ($func) {
                case 'useData':
                    $this->engineAddData($container['context'], $args);
                    break;
                case 'useContext':
                    $this->engineAddContext($container['context'], $args);
                    break;
            }
        });
    }