Find a namespace by its canonical name, local name or namespace alias

@param string $name
@return NamespaceInfo|null
497406
public function getNamespaceByName( $name ) {
		$result = $this->getNamespaceResult()['query'];
		foreach ( $result['namespaces'] as $nsInfo ) {
			if ( ( !empty( $nsInfo['canonical'] ) && $nsInfo['canonical'] === $name ) ||
				$nsInfo['*'] === $name ) {
				return $this->createNamespaceFromQuery( $nsInfo, $result['namespacealiases'] );
			}
		}
		foreach ( $result['namespacealiases'] as $alias ) {
			if ( $alias['*'] === $name && !empty( $result['namespaces'][$alias['id']] ) ) {
				return $this->createNamespaceFromQuery(
					$result['namespaces'][$alias['id']],
					$result['namespacealiases']
				);
			}
		}
		return null;
	}
722336
public static function get(string $namespace, string $name = null)
    {
        $name = $name ?: 'default';

        if (isset(self::$container[$namespace][$name])) {
            return self::$container[$namespace][$name];
        }

        return null;
    }
821688
public function findRequest(string $name)
    {
        foreach ($this->actions as $action) {
            if ($action->getRequest()->getName() === $name) {
                return $action->getRequest();
            }
        }

        return null;
    }
1109589
protected function _getPatterned($name)
    {
        foreach ($this->_patterns as $pattern => $namespaces) {
            if (fnmatch($pattern, $name)) {
                if (is_string($namespaces)) {
                    return strpos($namespaces, '@') === false ? $namespaces . ucfirst($name) : $this->alias->resolveNS($namespaces . ucfirst($name));
                } else {
                    foreach ($namespaces as $namespace) {
                        $className = strpos($namespace, '@') === false ? $namespace . ucfirst($name) : $this->alias->resolveNS($namespace . ucfirst($name));
                        if (class_exists($className)) {
                            return $className;
                        }
                    }
                    return null;
                }
            }
        }

        return null;
    }
311944
public function resolve($name)
    {
        if (class_exists($name)) {
            return $name;
        }

        $name = static::normalise($name);

        $namespaces = clone $this->namespaces;

        $this->registerDefaultNamespace($namespaces);

        foreach (clone $namespaces as $ns) {
            $class = $ns . '\\' . $name;

            if (class_exists($class = $this->resolveClassAlias($class))) {
                if ($this->baseClass && !is_subclass_of($class, $this->baseClass)) {
                    throw new \DomainException(sprintf(
                        'Class: "%s" should be sub class of %s',
                        $class,
                        $this->baseClass
                    ));
                }

                return $class;
            }
        }

        throw new \DomainException(sprintf(
            'Can not find any classes with name: "%s" in package: "%s", namespaces: ( %s ).',
            $name,
            $this->package->getName(),
            implode(" |\n ", $namespaces->toArray())
        ));
    }
1130706
public function getLongName($name)
    {
        if (!$this->isParsed) {
            $this->parseDefinitions();
        } //if

        if (isset($this->shortNames[$name])) {
            return $this->shortNames[$name];
        } else {
            return null;
        } //if
    }
319513
public function get($name)
	{
		$namespaced = $this->namespace.':'.$name;

		$queued   = $this->length($namespaced, 'list');
		$delayed  = $this->length($namespaced.':delayed', 'zset');
		$reserved = $this->length($namespaced.':reserved', 'zset');

		return array('queued' => $queued, 'delayed' => $delayed, 'reserved' => $reserved);
	}
1277005
public function getAlias($name)
        {
            if (isset($this->_aliases[$name])) {
                return $this->_aliases[$name];
            }

            return null;
        }
992486
public function getByName($name)
    {
        if (!isset($this->nameMap[$name])) {
            return null;
        }

        return $this->get($this->nameMap[$name]);
    }
641410
private function getScanNamespaceFromProperties(string $name)
    {
        $properties = $this->properties;

        if (!isset($properties[$name]) || !\is_array($properties[$name])) {
            return [];
        }

        return $properties[$name];
    }
1180935
public function findValueByName($name)
    {
        // No values defined yet.
        if (is_null($this->values)) {
            return null;
        }

        // Traverse and Return.
        return $this->traverseNodesAndFindBy('name', $name, $this->values);
    }
868429
public function getByName($name)
	{
		return isset($this->nameList[$name]) ? $this->nameList[$name] : null;
	}
1019017
protected static function _namespaceIsset($namespace, $name = null)
    {
        if (self::$_readable === false) {
            /**
             * @see Zend_Session_Exception
             */
            require_once 'Zend/Session/Exception.php';
            throw new Zend_Session_Exception(self::_THROW_NOT_READABLE_MSG);
        }

        if ($name === null) {
            return ( isset($_SESSION[$namespace]) || isset(self::$_expiringData[$namespace]) );
        } else {
            return ( isset($_SESSION[$namespace][$name]) || isset(self::$_expiringData[$namespace][$name]) );
        }
    }
950682
public function getByName($name)
    {
        return isset($this->names[$name]) ? $this->names[$name] : null;
    }
1337211
public static function get($name)
    {
        $namespaces = config('crude.namespace');

        if (! is_array($namespaces)) {
            $fullName = $namespaces . $name;

            return class_exists($fullName)
                ? new $fullName()
                : null;
        }

        foreach ($namespaces as $namespace) {
            $fullName = $namespace . $name;
            if (class_exists($fullName))
                return new $fullName();
        }

        return null;
    }
1176102
public function setQualifiedName($name)
    {
        if (false !== $pos = strrpos($name, '\\')) {
            $this->namespace = substr($name, 0, $pos);
            $this->name = substr($name, $pos + 1);

            return $this;
        }

        $this->namespace = null;
        $this->name = $name;

        return $this;
    }
1088840
public function getSeederName($name)
    {
        $name = Str::studly($name);

        $namespace = $this->laravel['components']->config('namespace');

        return $namespace . '\\' . $name . '\Database\Seeders\\' . $name . 'DatabaseSeeder';
    }