Register a view file namespace.

@param string $path
@param string $namespace

@return void
556176
protected function loadViewsFrom($path, $namespace)
    {
        if (is_dir($appPath = resource_path('views/vendor/' . $namespace))) {
            $this->container['view']->addNamespace($namespace, $appPath);
        }

        $this->container['view']->addNamespace($namespace, $path);
    }
812723
protected function registerNamespaces()
    {
        $configPath = __DIR__ . '/../config/config.php';
        $viewsPath = __DIR__ . '/../views';
        $this->mergeConfigFrom($configPath, 'menus');
        $this->loadViewsFrom($viewsPath, 'menus');

        $this->publishes([
            $configPath => config_path('menus.php'),
        ], 'config');

        $this->publishes([
            $viewsPath => base_path('resources/views/vendor/nwidart/menus'),
        ], 'views');
    }
1189824
public function addConfigComponent(string $package, string $namespace, string $path): void
    {
        if ($this->hasPackageRepository()) {
            $this->app->make('config')->package($package, $path, $namespace);
        }
    }
333475
public function registerNamespace($namespace, $directory)
    {
        $namespace = rtrim($namespace, self::NS_SEPARATOR). self::NS_SEPARATOR;
        $this->namespaces[$namespace] = $this->normalizeDirectory($directory);
        return $this;
    }
424110
public function registerNamespace(PHPTAL_Namespace $ns)
    {
        $this->namespaces_by_uri[$ns->getNamespaceURI()] = $ns;
        $this->prefix_to_uri[$ns->getPrefix()] = $ns->getNamespaceURI();
        $prefix = strtolower($ns->getPrefix());
        foreach ($ns->getAttributes() as $name => $attribute) {
            $key = $prefix.':'.strtolower($name);
            $this->_dictionary[$key] = $attribute;
        }
    }
411105
private function updateNamespace(): void
    {
        //now path is totally sorted, update namespace based on path
        foreach ($this->filesCreated as $filePath) {
            $this->findAndReplaceHelper->setNamespaceFromPath(
                $filePath,
                $this->srcSubFolderName,
                $this->projectRootNamespace
            );
        }
    }
366750
public static function addPath ($path, $namespace = \Twig_Loader_Filesystem::MAIN_NAMESPACE)
    {
        $twigLoader = self::getTwigLoader();
        /* @var $twigLoader \Twig_Loader_Filesystem */
        $twigLoader->addPath($path, $namespace);
    }
906380
public function addRepository($path, $namespace = null)
    {
        $loader = $this->getTwig()->getLoader();

        if (false === ($loader instanceof \Twig_Loader_Filesystem)) {
            $this->throwException(500, 'Current twig loader does not support adding template repository');
        }

        /** @var \Twig_Loader_Filesystem $loader */
        $loader->addPath($path, true === isset($namespace) ? $namespace : \Twig_Loader_Filesystem::MAIN_NAMESPACE);

        return $this;
    }
868539
public function registerNamespaces($namespaces, $merge = true)
    {
        foreach ($namespaces as $namespace => $path) {
            $path = rtrim($path, '\\/');
            if (DIRECTORY_SEPARATOR === '\\') {
                $namespaces[$namespace] = strtr($path, '\\', '/');
            }
        }

        $this->_namespaces = $merge ? array_merge($this->_namespaces, $namespaces) : $namespaces;

        return $this;
    }
1000441
public function registerNamespace($namespace, $paths)
    {
        if (false === isset($this->_namespaces[$namespace])) {
            $this->_namespaces[$namespace] = array();
        }

        $this->_namespaces[$namespace] = array_merge($this->_namespaces[$namespace], (array) $paths);

        return $this;
    }
193950
protected function routesRegister(string $file, string $namespace)
    {
        $this->app->router->group([
            'namespace' => $namespace,
        ], function ($router) use ($file) {
            require $file;
        });
    }
661271
public function addPath($path, $namespace = self::MAIN_NAMESPACE)
    {
        // invalidate the cache
        $this->cache = $this->errorCache = [];

        if (!is_dir($path)) {
            throw new LoaderException(sprintf('The "%s" directory does not exist.', $path));
        }

        $this->paths[$namespace][] = rtrim($path, '/\\');
    }
614106
protected function registerPackageAssets($package, $namespace, $path)
    {
        $assets = dirname($path) .DS .'assets';

        if ($this->app['files']->isDirectory($assets)) {
            list ($vendor) = explode('/', $package);

            $namespace = Str::snake($vendor, '-') .'/' .str_replace('_', '-', $namespace);

            $this->app['assets.dispatcher']->package($package, $assets, $namespace);
        }
    }
829761
public function registerListenerNamespace($path)
    {
        if (false === isset($this->_namespaces['BackBee\Event\Listener'])) {
            $this->_namespaces['BackBee\Event\Listener'] = array();
        }

        array_unshift($this->_namespaces['BackBee\Event\Listener'], $path);

        return $this;
    }
333863
public static function set($namespace, $path)
    {
        $namespace = trim($namespace, '\\');
        $path = rtrim($path, '/');

        if (!isset(self::$_namespace_list[$namespace])) {
            self::$_namespace_list[$namespace] = [];
        }

        self::$_namespace_list[$namespace][] = $path;
    }
741870
public function add_template_directory($path, $namespace = null, $prepend = false) {
		$this->template->add_template_directory($path, $namespace, $prepend);
	}
495460
public function changeNamespace(string $namespace): void
	{
		$this->setNamespace($namespace);
		$result = $this->getStorage()->fetchAll();
		foreach ($result as $row) {
			$resource = $this->imageStorage->getResource($row->name);
			$resource->setNamespace($this->namespace);
			$this->imageStorage->save($resource);

			$this->getStorage()->update($row->key, $resource->getIdentifier());
		}
	}