Unload a registered autoload namespace

@param  string|array $namespace
@return Zend_Loader_Autoloader
184444
public function unregisterNamespace($namespace)
    {
        if (is_string($namespace)) {
            $namespace = (array) $namespace;
        } elseif (!is_array($namespace)) {
            throw new Zend_Loader_Exception('Invalid namespace provided');
        }

        foreach ($namespace as $ns) {
            if (isset($this->_namespaces[$ns])) {
                unset($this->_namespaces[$ns]);
            }
        }
        return $this;
    }
585774
private function getByNamespace($namespace)
    {
        $this->checkForNonEmptyNamespace($namespace);

        if (!isset($this->configurations[$namespace])) {
            $this->configurations[$namespace]
                = $this->retrieveConfigurationFromTypoScriptSetup($namespace);
        }

        return $this->configurations[$namespace];
    }
617391
public function getZendStorage(string $namespace = 'default')
    {
        static $storages = [];
        
        if (!isset($storages[$namespace])) {
            $rrm = new RedisResourceManager();
            $rrm->setResource('default', $this->getRedis());
            $rrm->setLibOption('default', Redis::OPT_SERIALIZER, $this->redis->getOption(Redis::OPT_SERIALIZER));
            $options = new RedisOptions();
            $options->setResourceManager($rrm);
            $storages[$namespace] = new RedisAdapter($options);
        }
        return $storages[$namespace];
    }
961987
public function factory($namespace, array $args = [])
    {
        $namespace = $this->checkOverrider($namespace);

        $this->classExists($namespace)
            ->callEvent('register_before_create', [$namespace, $args]);

        try {
            $object = new $namespace(...$args);
        } catch (\Exception $exception) {
            throw new RegisterException($exception);
        }

        $this->callEvent('register_after_create', [$object]);

        $this->setClassCounter($namespace);
        $this->registeredObjects[$namespace] = get_class($object);

        $this->makeLog([
            'Object created: ' . $namespace . '. With args:',
            $args
        ]);

        return $object;
    }
360499
public function setNamespace($namespace)
	{
	    $this->namespace = rtrim($namespace, '\\');
	    
	    // set autoload
	    if ($this->namespace) {
	        Ioc::loader()->setPsr4($this->namespace, $this->basePath . 'src');
	    }
	    
	    return $this;
	}
1076743
public function removeNamespace( $prefix, $namespace )
	{
		if ( ! $this->hasNamespace( $prefix ) ) return false;
		unset( $this->namespaces[ $prefix ] );
		return true;
	}
1286613
public function findNamespace($namespace)
    {
        $allNamespaces = $this->getNamespaces();
        $expr = preg_replace_callback('{([^:]+|)}', function ($matches) { return preg_quote($matches[1]).'[^:]*'; }, $namespace);
        $namespaces = preg_grep('{^'.$expr.'}', $allNamespaces);

        if (empty($namespaces)) {
            $message = sprintf('There are no commands defined in the "%s" namespace.', $namespace);

            if ($alternatives = $this->findAlternatives($namespace, $allNamespaces)) {
                if (1 == count($alternatives)) {
                    $message .= "\n\nDid you mean this?\n    ";
                } else {
                    $message .= "\n\nDid you mean one of these?\n    ";
                }

                $message .= implode("\n    ", $alternatives);
            }

            throw new CommandNotFoundException($message, $alternatives);
        }

        $exact = in_array($namespace, $namespaces, true);
        if (count($namespaces) > 1 && !$exact) {
            throw new CommandNotFoundException(sprintf("The namespace \"%s\" is ambiguous.\nDid you mean one of these?\n%s", $namespace, $this->getAbbreviationSuggestions(array_values($namespaces))), array_values($namespaces));
        }

        return $exact ? $namespace : reset($namespaces);
    }
767778
public function registerNamespaces($namespaces)
    {
        if (!is_array($namespaces) && !$namespaces instanceof Traversable) {

            throw new Zend_Loader_Exception_InvalidArgumentException('Namespace pairs must be either an array or Traversable');
        }

        foreach ($namespaces as $namespace => $directory) {
            $this->registerNamespace($namespace, $directory);
        }
        return $this;
    }
1084974
public function invalidate($namespace)
	{
		if($this->prefix) {
			$namespace = $this->prefix.$this->delimiter.$namespace;
		}

		return $this->mapper->invalidate($namespace);
	}
998989
public function getUnsetValue($name, $namespace = self::DEFAULT_NAMESPACE)
    {
        $value = $this->getValue($name, $namespace);
        $this->unsetValue($name, $namespace);

        return $value;
    }
566834
protected function removeRootNamespace($classname)
    {
        $namespaces = $this->splitNamespaces($classname);
        if (count($namespaces) > 1) {
            $classname = implode('\\', array_slice($namespaces, 1));
        }

        return $classname;
    }
270572
public function clear($name, $namespace = 'default')
	{
		// Add prefix to namespace to avoid collisions
		$namespace = '__' . $namespace;

		if ($this->state !== 'active')
		{
			// @TODO :: generated error here
			return null;
		}

		$value = null;
		if (isset($_SESSION[$namespace][$name]))
		{
			$value = $_SESSION[$namespace][$name];
			unset($_SESSION[$namespace][$name]);
		}

		return $value;
	}
184008
public function load($namespace)
    {
        if ($path = $this->cache->isCached($namespace)) {
            if (filectime($this->configPath.$namespace.self::CONFIG_EXT) <= filectime($path)) {
                $this->data[$namespace] = include $path;

                return;
            }
        }
        if (file_exists($this->configPath.$namespace.self::CONFIG_EXT)) {
            $data = Yaml::parse(file_get_contents($this->configPath.$namespace.self::CONFIG_EXT));
            $this->data[$namespace] = $data;
            $this->cache->setString($namespace, '<?php return '.var_export($data, true).'; ?>');

            return;
        }
        throw new ConfigException("Could not load Configuration '".$namespace."'");
    }
233538
protected function checkOverrider($namespace)
    {
        if ($this->allowOverride && isset($this->overrides[$namespace])) {
            $oldNamespace = $namespace;

            $namespace = $this->overrides[$namespace]['overrider'];
            $this->classExists($namespace);

            if ($this->overrides[$oldNamespace]['only_once']) {
                $this->unsetOverrider($oldNamespace);
            }
        }

        return $namespace;
    }
463857
protected function namespaceCreateAllDir(string $namespace){
        if ( is_dir($namespace)) return;
        $dirList = explode('\\' , str_replace('/' , '\\' , $namespace));
        $path = $this->annotationConfig->getConfig()['buildPath'];
        foreach ($dirList as $k => $dir){
            $path .=  '/' . $dir;
            // if not existed create the dir
            if ( !is_dir($path)) mkdir($path);
        }
    }
785841
public function createLoader(array $autoloads)
    {
        $loader = new ClassLoader();

        if (isset($autoloads['psr-0'])) {
            foreach ($autoloads['psr-0'] as $namespace => $path) {
                $loader->add($namespace, $path);
            }
        }

        if (isset($autoloads['psr-4'])) {
            foreach ($autoloads['psr-4'] as $namespace => $path) {
                $loader->addPsr4($namespace, $path);
            }
        }

        return $loader;
    }
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;
    }