Get proxy class dir and create it

@param string $namespace
@return string
@throws InitiallyRpcException
427440
protected function getProxyClassDirAndCreate($namespace)
    {
        $path = str_replace("\\", DIRECTORY_SEPARATOR, $namespace);
        $dir = $this->config->getProxyRootDir() . DIRECTORY_SEPARATOR . $path;
        if (!Util::createDirIfNotExists($dir)) {
            throw new InitiallyRpcException("Proxy builder error: get proxy class dir and create it");
        }

        return $dir;
    }
1026176
public static function create($filter, \SplPriorityQueue $namespaces = null)
    {
        if (class_exists($filter)) {
            return new $filter();
        }

        $namespaces = $namespaces ?: static::getNamespaces();

        foreach ($namespaces as $namespace) {
            $class = trim($namespace, '\\') . '\\' . ucfirst($filter) . 'Filter';

            if (class_exists($class)) {
                return new $class();
            }
        }

        return new DefaultFilter($filter);
    }
1325098
protected function findClasses(string $namespace, array $dirs, array $excludes = []): array
	{
		$loader = $this->createLoader();
		$loader->addDirectory($dirs);
		$loader->rebuild();

		$indexed = $loader->getIndexedClasses();
		$classes = [];
		foreach ($indexed as $class => $file) {
			// Different namespace
			if (!Strings::startsWith($class, $namespace)) continue;

			// Excluded namespace
			if (array_filter($excludes, function (string $exclude) use ($class): bool {
				return Strings::startsWith($class, $exclude);
			}) !== []) continue;

			// Skip not existing class
			if (!class_exists($class, true)) continue;

			// Detect by reflection
			$ct = new ReflectionClass($class);

			// Skip abstract
			if ($ct->isAbstract()) continue;

			// All tests passed, it's our class
			$classes[] = $class;
		}

		return $classes;
	}
599900
public function getClassesFromNamespace($namespace = null)
    {
        $namespace = $namespace ?: $this->getAppNamespace();

        $path = $this->convertNamespaceToPath($namespace);

        return $this->finder->findClasses($path);
    }
271733
protected function getServiceClassFromNamespaces(
        array $namespaces,
        string $suffix,
        string $directory = null
    ): ?string {
        $serviceClass = null;

        foreach ($namespaces as $namespace) {
            $class = $this->getNamespace($namespace, $suffix, $directory);
            if (class_exists($class) && is_subclass_of($class, XerviceInterface::class)) {
                $serviceClass = $class;
                break;
            }
        }

        return $serviceClass;
    }
557054
public function createWrapper($namespace = null) {
		if (! isset($this->_wrappers[$namespace])) {
			$wrapper  = new Wrapper($this->getBackend(), $namespace);
			$lifetime = $this->getDefaultLifetime();
			
			if ($lifetime !== null) {
				$wrapper->setDefaultLifetime($lifetime);
			}
			
			$this->_wrappers[$namespace] = $wrapper;
		}
		
		return $this->_wrappers[$namespace];
	}
347356
public function getRequiredFiles($namespace)
    {
        $files = [];

        // First loop is finding 'production' config for each basepath:
        foreach ($this->configPaths as $basePath) {
            $configFileCandidate = $basePath.'/'.$namespace.'.php';
            if (file_exists($configFileCandidate)) {
                $files[] = [
                    'path' => realpath($configFileCandidate),
                    'environment' => null
                ];
            }
        }

        // Second loop is finding 'environment level' config for each basepath:
        if ($this->config->getEnvironment() !== null) {
            foreach ($this->configPaths as $basePath) {
                $envConfigFileCandidate = $basePath.'/'.$this->config->getEnvironment().'/'.$namespace.'.php';
                if (file_exists($envConfigFileCandidate)) {
                    $files[] = [
                        'path' => realpath($envConfigFileCandidate),
                        'environment' => $this->config->getEnvironment()
                    ];
                }
            }
        }
        return $files;
    }
902406
protected static function _namespaceGetAll($namespace)
    {
        $currentData  = (isset($_SESSION[$namespace]) && is_array($_SESSION[$namespace])) ?
            $_SESSION[$namespace] : array();
        $expiringData = (isset(self::$_expiringData[$namespace]) && is_array(self::$_expiringData[$namespace])) ?
            self::$_expiringData[$namespace] : array();
        return array_merge($currentData, $expiringData);
    }
253123
private function apply_namespace_filters( $namespace, $class, $dir )
    {
        foreach( $this->filters[$namespace] as $filter )
        {
            if( is_callable( $filter ) )
            {
                $file = call_user_func_array( $filter, array( $class, $namespace, $dir ) );
                if ( file_exists( $file ) ) 
                {
                    return $file;
                }
            }
        }
    }
986491
public function getPrefixForDocumentNamespace( $namespace )
	{
		if ( is_null( $this->cacheDocumentNamespaces ) )
		{
			$this->cacheDocumentNamespaces = array_flip( $this->instance_xml->getDocNamespaces() );
			// If the default namespace is one of the standards ones then the prefix may be missing
			$standardNamespaces = array_flip( XBRL_Constants::$standardPrefixes );
			$docNamespace = array_search( '', $this->cacheDocumentNamespaces );
			if ( $docNamespace )
			{
				if ( isset( $standardNamespaces[ $docNamespace ] ) )
				{
					$this->cacheDocumentNamespaces[ $docNamespace ] = $standardNamespaces[ $docNamespace ];
				}
				else
				{
					// Get the namespace for the respective namespace
					$taxonomy = $this->getInstanceTaxonomy()->getTaxonomyForNamespace( $docNamespace );
					if ( $taxonomy )
					{
						$this->cacheDocumentNamespaces[ $docNamespace ] = $taxonomy->getPrefix();
					}
				}
			}
		}

		return isset( $this->cacheDocumentNamespaces[ $namespace ] )
			? $this->cacheDocumentNamespaces[ $namespace ]
			: false;
	}
240802
protected function getClassNamesInNamespace($namespace)
    {
        $affectedViewHelperClassNames = array();

        $allViewHelperClassNames = $this->reflectionService->getAllSubClassNamesForClass(\TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper::class);
        foreach ($allViewHelperClassNames as $viewHelperClassName) {
            if ($this->reflectionService->isClassAbstract($viewHelperClassName)) {
                continue;
            }
            if (strncmp($namespace, $viewHelperClassName, strlen($namespace)) === 0) {
                $affectedViewHelperClassNames[] = $viewHelperClassName;
            }
        }
        sort($affectedViewHelperClassNames);
        return $affectedViewHelperClassNames;
    }
482161
public static function config($namespace)
    {
        $configPath = pluginsPath($namespace.'/config.json');
        if(file_exists($configPath)) {
            return json_decode(File::get($configPath));
        }
        throw  new \Exception("No config.json file found for plugin ".$configPath);
    }
459465
public function ns($nameSpace)
    {
        // If ! exist try to load a configuration file 
        if ( !isset($this->nameSpaces[$nameSpace]) ) {
            // short sanitize of nameSpace
            if (!filter_var( $nameSpace,FILTER_VALIDATE_REGEXP, 
                array('options'=>array('regexp' => '/^[\w]+$/')))) {
                    throw new InvalidArgumentException("Invalid configuration name.",400);
            }
            $this->nameSpaces[$nameSpace] = new ContextNameSpace($this->loadArrayFromIniFile($nameSpace));
        }
        
        return $this->nameSpaces[$nameSpace];
    }
1119968
public function getTemplatePath($namespace)
    {
        if (!$this->hasTemplatePath($namespace)) {
            throw new \RuntimeException("Path with namespace \"".$namespace."\" is not exist");
        }

        $path = $this->paths[$namespace];

        if (!is_dir($path)) {
            throw new \RuntimeException("Invalid template path with namespace \"".$namespace."\"");
        }

        return $path;
    }
168841
public function namespaceToPath($namespace, Dir $classPath = NULL) {
    $cp = $classPath ?: $this->getClassPath()->up();
    
    // end und anfangs backslashs weg
    $namespace = trim($namespace,'\\'); 
    
    $dir = $cp->sub(str_replace('\\','/',$namespace).'/');
    
    return $dir;
  }
362197
public function getModuleConfig(string $namespace) {
		if (array_key_exists($namespace, $this->moduleConfigs)) {
			return $this->moduleConfigs[$namespace];
		}
		
		$module = $this->moduleManager->getModuleByNs($namespace);
		if ($module->hasConfigDescriber()) {
			return $this->moduleConfigs[$namespace] = $module->createConfigDescriber($this)->buildCustomConfig();
		}
		
		return $this->moduleConfigs[$namespace] = null;
	}
1310653
public function convertNamespaceToPath($namespace)
    {
        // remove the app namespace from the namespace if it is there
        $appNamespace = $this->getAppNamespace();

        if (substr($namespace, 0, strlen($appNamespace)) == $appNamespace) {
            $namespace = substr($namespace, strlen($appNamespace));
        }

        // trim and return the path
        return str_replace('\\', '/', trim($namespace, ' \\'));
    }