private function getViewFactory(): Factory
    {
        if ($this->factory) {
            return $this->factory;
        }

        $resolver = new EngineResolver();
        $resolver->register("blade", function () {
            $blade = $this->getCompiler();
            return new CompilerEngine($blade);
        });

        $this->factory = new Factory($resolver, $this->getViewFinder(), new Dispatcher());

        return $this->factory;
    }