@param string $nameOrAlias

@return string
517303
function aliasGetName($nameOrAlias) {
    if ('\\' === $nameOrAlias[0]) {
      return substr($nameOrAlias, 1);
    }
    elseif (array_key_exists($nameOrAlias, $this->namesByAlias)) {
      return $this->namesByAlias[$nameOrAlias];
    }
    elseif (NULL !== $this->namespaceName) {
      return $this->namespaceName . '\\' . $nameOrAlias;
    }
    else {
      return $nameOrAlias;
    }
  }
1145641
public static function getNamespace($tokens)
    {
        $count = count($tokens);
        $i = 0;
        $namespace = '';
        $namespace_ok = false;
        while ($i < $count) {
            $token = $tokens[$i];
            if (is_array($token) && $token[0] === T_NAMESPACE) {
                // Found namespace declaration
                while (++$i < $count) {
                    if ($tokens[$i] === ';') {
                        $namespace_ok = true;
                        $namespace = trim($namespace);
                        break;
                    }
                    $namespace .= is_array($tokens[$i]) ? $tokens[$i][1] : $tokens[$i];
                }
                break;
            }
            $i++;
        }
        if (!$namespace_ok) {
            return null;
        } else {
            return $namespace;
        }
    }
305640
public static function v3(string $namespace, string $name): string
	{
		$hash = md5(self::toBinary($namespace) . $name);

		return sprintf
		(
			'%s-%s-%x-%x-%s',
			substr($hash, 0, 8),
			substr($hash, 8, 4),
			(hexdec(substr($hash, 12, 4)) & 0x0fff) | 0x3000,
			(hexdec(substr($hash, 16, 4)) & 0x3fff) | 0x8000,
			substr($hash, 20, 12)
		);
	}
1049607
public function replaceNameWithoutExtension($nameWithoutExtension)
    {
        $atoms = $this->nameAtoms();
        if (count($atoms) < 2) {
            return $this->replaceName($nameWithoutExtension);
        }

        array_splice($atoms, 0, -1, array($nameWithoutExtension));

        return $this->replaceName(implode(self::EXTENSION_SEPARATOR, $atoms));
    }
175372
protected function getCollectionUpperName($name = null)
    {
        $name = str_plural($this->getResourceName($name));

        $pieces = explode('_', $name);
        $name = "";
        foreach ($pieces as $k => $str) {
            $name .= ucfirst($str);
        }

        return $name;
    }
1236495
public function resolve(string $namespace, string $version, string $name): string
    {
        $class = str_replace('.', '\\', $name);

        if (! array_key_exists($version, $this->supportedVersions)) {
            $version = $this->defaultVersion;
        }

        return sprintf('%s\%s\%s\%s', $namespace, $this->supportedVersions[$version], $class);
    }
1285946
public function make(Name $name, array $options): string
    {
        $options = (new Map($options))->filter(function ($key, $value) {
            return !$value->isExceptional();
        });

        return $this->url($name, $options);
    }
1336480
protected function fetchMessagesFromNamespace($namespace)
    {
        $this->setNamespace($namespace);

        if ($this->hasMessages()) {
            $messages = $this->getMessagesFromNamespace($namespace);
            // reset namespace
            $this->setNamespace();

            return $this->buildMessage($namespace, $messages);
        }

        return '';
    }
396597
protected static function getAdapterName($name, $namespace = "Adapter/")
    {
        $path = self::getFilePath($namespace);
        $scan = scandir($path);

        foreach ($scan as $node) {
            $file = String::factory($node)->toLower();

            if ($file->startsWith($name) && $file->endsWith(".php")) {
                return str_replace(".php", "", "TeamSpeak3\\Adapter\\" . $node);
            }
        }

        throw new Ts3Exception("adapter '" . $name . "' does not exist");
    }
655904
public function getNestedName(
        string $delimiter = ".",
        string $name = ""
    ): string
    {
        $keys = array_filter([$this->name, $name], "strlen");
        $parent = $this;
        while ($parent = $parent->getParent()) {
            $name = $parent->getName();
            if ($name) {
                array_unshift($keys, $parent->getName());
            }
        }
        return implode($delimiter, $keys);
    }
1297671
public function getOption($nameOrAlias, $default = null) {
        try {
            $option = $this->getCommand()->findOption($nameOrAlias);
            $value = $option->getValue();

            if ($value === null) {
                $value = $default;
            }

            return $value;
        } catch (OptionNotFoundException $ex) {}

        return $default;
    }
16364
private function quoteAliasedName(string $name): string
    {
        $parts = preg_split('/ AS /i', $name);
        foreach ($parts as $i => $part) {
            $parts[$i] = $this->quoteSimpleName($part);
        }
        return implode(' AS ', $parts);
    }
1319078
public String findParameterNameByAlias(String nameOrAlias) {
		String[] arrays = nameOrAlias.split("\\.");
		String prefix = "";

		if (arrays.length == 2) {
			nameOrAlias = arrays[0];
			prefix = "." + arrays[1];

		}

		if (parameterAlias2NameField.containsKey(nameOrAlias)) {
			return parameterAlias2NameField.get(nameOrAlias) + prefix;
		}

		return nameOrAlias + prefix;
	}
224744
public function quoteDoubleIdentifier(string $tableOrAlias, string $column): string
    {
        $platform = $this->getConnection()->getDatabasePlatform();

        return $platform->quoteSingleIdentifier($tableOrAlias) . '.' . $platform->quoteSingleIdentifier($column);
    }
643685
public function renderMatchers(array $matchers): string
    {
        if (count($matchers) < 1) {
            return '<none>';
        }

        $rendered = [];

        foreach ($matchers as $matcher) {
            $rendered[] = $matcher->describe($this->exporter);
        }

        return implode(', ', $rendered);
    }
645139
public function getMethod($nameOrMethod): PhpMethod {
		if ($nameOrMethod instanceof PhpMethod) {
			$nameOrMethod = $nameOrMethod->getName();
		}

		if (!$this->methods->has($nameOrMethod)) {
			throw new \InvalidArgumentException(sprintf('The method "%s" does not exist.', $nameOrMethod));
		}

		return $this->methods->get($nameOrMethod);
	}
996339
protected function getNormalizedName(string $name): string
    {
        $name = str_replace('antaresproject/component-', 'antares/', $name);
        $name = str_replace('antaresproject/module-', 'antares/', $name);

        return str_replace('-', '_', $name);
    }