namespaces[$namespace] = $hints; return $this; } public function extend(Container $container, Extension $extension = null) { $container->resolving(Factory::class, function (Factory $view) { foreach ($this->namespaces as $namespace => $hints) { $view->addNamespace($namespace, $hints); } }); } }