protected function getViewFactory(IContainer $container) : IViewFactory
    {
        $resolver = new FileViewNameResolver();
        $resolver->registerPath(Config::get('paths', 'views.raw'));
        $resolver->registerExtension('fortune');
        $resolver->registerExtension('fortune.php');
        $resolver->registerExtension('php');
        $viewReader = $this->getViewReader($container);
        $container->bindInstance(IViewNameResolver::class, $resolver);
        $container->bindInstance(IViewReader::class, $viewReader);

        return new ViewFactory($resolver, $viewReader);
    }