@param array $namespaceResources

@return bool
550206
private function checkNamespaceResources(array $namespaceResources): bool
    {
        $isValid = true;
        foreach ($namespaceResources as $namespace => $resources) {
            $isValid = $isValid === true &&
                empty($namespace) === false &&
                is_array($resources) === true && $this->checkResources($resources);
        }

        return $isValid;
    }
899635
private function reduceStmts(array $namespaces): array
    {
        $stmts = [];
        foreach ($namespaces as $namespace) {
            foreach ($namespace->stmts as $stmt) {
                $stmts[] = $stmt;
            }
        }
        return $stmts;
    }
760545
public static function setNamespaces($namespaces)
    {
        $called = get_called_class();

        if (!$namespaces instanceof PriorityQueue) {
            $namespaces = new PriorityQueue();
        }

        static::$namespaces[$called] = $namespaces;
    }
345378
public function clear($namespace = null)
    {
        $this->getNotificationsFromContainer();

        if ($namespace) {
            if (isset($this->notifications[$namespace])) {
                unset($this->notifications[$namespace]);
                return true;
            }

            return false;
        }

        foreach ($this->notifications as $nm => $type) {
            unset($this->notifications[$nm]);
        }

        return true;
    }
1223632
public function setNamespaceAliases(array $namespace_aliases)
    {
        $this->namespace_aliases = array();
        foreach ($namespace_aliases as $alias => $fqnn) {
            $this->setNamespaceAlias($alias, $fqnn);
        }
        return $this;
    }
683928
protected function buildPathFromNamespace($namespace)
    {
        // Prepare the namespace
        $namespace = Framework::prepareNamespace($namespace);
        
        // Load the module
        $moduleManager = $this->framework->getModuleManager();
        $module = $moduleManager->getModule($namespace);
        if ($module === false) {
            return false;
        }
        
        return $module->getDirectory();
    }
1150812
public function getPrefixForNamespace( $namespace )
	{
		if ( ! isset( $this->processedSchemasByNamespace ) ||
			 count( $this->processedSchemasByNamespace ) != count( $this->processedSchemas )
		)
		{
			$this->processedSchemasByNamespace = array_flip( $this->processedSchemas );
		}

		return isset( $this->processedSchemasByNamespace[ $namespace ] )
			? $this->processedSchemasByNamespace[ $namespace ]
			: false;
	}
736225
protected function isFacade(string $namespace, string $name): bool
    {
        if (preg_match('/^Spryker[a-zA-Z]*\\\\Zed\\\\[a-zA-Z]+\\\\Business$/', $namespace) && preg_match('/^(.*?)(Facade|FacadeInterface)$/', $name)) {
            return true;
        }

        return false;
    }
1276177
public static function add_namespaces(array $namespaces, $prepend = false)
	{
		if ( ! $prepend)
		{
			static::$namespaces = array_merge(static::$namespaces, $namespaces);
		}
		else
		{
			static::$namespaces = $namespaces + static::$namespaces;
		}
	}
739727
private function isValidNamespace($namespace, $directories): bool
    {
        if (is_string($namespace) && is_array($directories)) {
            $total = count($directories);
            $valid = count(array_filter($directories, 'is_string'));

            return $total > 0 && $total == $valid;
        }

        return false;
    }
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;
    }
1076743
public function removeNamespace( $prefix, $namespace )
	{
		if ( ! $this->hasNamespace( $prefix ) ) return false;
		unset( $this->namespaces[ $prefix ] );
		return true;
	}
41256
public function onSave(ArrayAccess $parameters, $namespace = null)
    {

        $exception = false;
        if (is_null($namespace)) {
            return true;
        }
        try {
            $fieldsCollection = $this->field->query()->where('namespace', $namespace)->get();
            if ($fieldsCollection->isEmpty()) {
                return true;
            }
            $collection = [];

            $fieldsCollection->each(function($field) use(&$collection) {

                if (array_key_exists($field->name, $this->input)) {
                    $collection[$field->id] = $this->input[$field->name];
                }
            });
            call_user_func_array([$this, 'save'], [$collection, $parameters->id, $namespace]);
        } catch (\Exception $e) {

            $exception = $e;
        }

        return $exception === false;
    }
435658
protected function _setNamespaceFromGetters(array $gettersNamespaces)
    {
        ($this->_c__namespace) ?: $this->_c__namespace = $this->namespace;
        $this->setNamespace($gettersNamespaces);
        $this->namespace_getter = array();

        return $this;
    }
411264
private function addNamespacePaths(& $list, $namespace, $paths)
    {
        $namespace = $namespace === '' ? '' : trim($namespace, '\\') . '\\';

        if (!isset($list[$namespace])) {
            $list[$namespace] = [];
        }

        if (is_array($paths)) {
            $list[$namespace] = array_merge($list[$namespace], $paths);
        } else {
            $list[$namespace][] = $paths;
        }
    }
966552
public function mount($namespaceName, $uriSpace)
    {
        foreach ($this->resources as $className => $metadata) {
            if ($metadata->getNamespace() == $namespaceName) {
                $metadata->mount($uriSpace);
            }
        }
    }
50421
public function hasQueries(array $names) {
        foreach ($names as $name) {
            if (!$this->hasQuery($name))
                return false;
        }
        
        return true;
    }