Gets full class name

@param string $name
@param string $declaringClass
@return string|null
7792
public function resolve($name, $declaringClass)
    {
        if (strpos($name, '\\') !== false) {
            return $name;
        }
        $imports = $this->cache->get('_PHX.imports.'.$declaringClass);
        if (!isset($imports)) {
            $imports = ClassHelper::getImports($declaringClass);
            $this->cache->save('_PHX.imports.'.$declaringClass, $imports);
        }
        if (isset($imports[$name])) {
            return $imports[$name];
        }
        $class = ClassHelper::getNamespaceName($declaringClass) . $name;
        if (class_exists($class)) {
            return $class;
        }
    }
26775
protected function buildClassNameFromName($name)
	{
		$class_name_parts = explode(' ', $name);

		return count($class_name_parts) == 1 ? $name : implode('', array_map('ucfirst', $class_name_parts));
	}
577017
public static function getDynamicMetadataClassName($name)
    {
        // Convert to a CamelCase class name.
        // See Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter::denormalize()
        $camelCasedName = preg_replace_callback('/(^|_|\.)+(.)/', function ($match) {
            return ('.' === $match[1] ? '_' : '').strtoupper($match[2]);
        }, $name);

        return 'Rokka\Client\Core\DynamicMetadata\\'.$camelCasedName;
    }
886379
protected function _normalizeClass($name)
    {
        if (!$name || $name[0] === '\\') {
            return $name;
        }
        if ($this->_states['uses']) {
            $tokens = explode('\\', $name, 2);
            if (isset($this->_states['uses'][$tokens[0]])) {
                $prefix = $this->_states['uses'][$tokens[0]];
                return count($tokens) === 2 ? '\\' . $prefix . '\\' . $tokens[1] : '\\' . $prefix;
            }
        }
        $current = $this->_states['current'];
        $prefix = '\\';
        if ($current->namespace) {
            $prefix .= $current->namespace->name . '\\';
        }
        return $prefix . $name;
    }
694857
function &classNamed($name)
    {
        $class = NULL;
        $pos = strrpos($name, '\\');
        if ($pos != FALSE) {
            $package = substr($name, 0, $pos);
            $name = substr($name, $pos + 1);
        }
        if (isset($package)) {
            if (isset($this->_packages[$package])) {
                $class =& $this->_packages[$package]->findClass($name);
            }
        } else {
            $packages = $this->_packages; // we do this copy so as not to upset the internal pointer of the array outside this scope
            foreach ($packages as $packageName => $package) {
                $class =& $package->findClass($name);
                if ($class != NULL) break;
            }
        }

        return $class;
    }
731371
protected function getPluginClassByName($name)
    {
        if (array_key_exists($name, $this->plugins) === false) {
            return false;
        }

        return $this->plugins[$name];
    }
1178993
static String getClassName(ClassSymbol c, boolean full) {
        if (full) {
            return c.getQualifiedName().toString();
        } else {
            String n = "";
            for ( ; c != null; c = c.owner.enclClass()) {
                n = c.name + (n.equals("") ? "" : ".") + n;
            }
            return n;
        }
    }
672933
public function getClassName($name)
    {
        if (!isset($this->mapping[$name])) {
            throw new \InvalidArgumentException(sprintf('Could not find "%s"', $name));
        }

        return $this->mapping[$name];
    }
1019978
private function getProperty($name)
    {
        $normalized = lcfirst($name);
        $old = "_{$normalized}";
        $name = false;
        foreach ($this->getInspector()->getClassProperties() as $property) {
            if ($old == $property || $normalized == $property) {
                $name = $property;
                break;
            }
        }
        return $name;
    }
1055027
private function getClassFor($name)
    {
        $test = strtolower($name);
        foreach ($this->types as $class => $matchers) {
            foreach ($matchers as $matcher) {
                if ($test === $matcher) {
                    return $class;
                }
            }
        }
        return $this->genericType;
    }
649672
public function findDefinition(string $name)
    {
        $name = $this->normalizeDefinitionName($name);

        foreach ($this->definitions as $definition) {
            if ($definition->getName() === $name) {
                return $definition;
            }
        }

        return null;
    }
155611
private function getClassNameCandidates(array $namespaces, $name)
    {
        $className = str_replace(' ', '', ucwords($name));

        return array_map(function ($namespace) use ($className) { return $namespace.$className; }, $namespaces);
    }
1285363
public function getFullClassName($class)
    {
        // Rootclass
        if ($class[0] === '\\') {
            return $class;
        }

        $classParts = explode('\\', $class);
        $className  = array_pop($classParts);
        $firstPart  = array_shift($classParts);
        $middlePart = implode('\\', $classParts) ?: null;
        $found      = false;

        // Rewind the uses array
        $this->uses->rewind();

        // Check if the class has been 'used'
        foreach ($this->uses as $use) {
            if ($firstPart === null) {
                if ($use->getAlias() === $className || preg_match("/\\\\?{$className}$/", $use->getName())) {
                    // Mark class as 'found'
                    $found = true;

                    // The use is a full class include
                    $class = $use->getName();

                    break;
                }
            } else {
                if (preg_match("/{$firstPart}$/", $use->getAlias()) || preg_match("/{$firstPart}$/", $use->getName())) {
                    $class = "{$use->getName()}" . ($middlePart ? "\\{$middlePart}" : '') . "\\{$className}";
                    $found = true;
                    break;
                }
            }
        }

        // Nothing matches, check the class namespace
        if ($found === false) {
            $class = "{$this->namespace}\\{$class}";
        }

        // Check if the class exists
        return $class;
    }
1137395
private function getCommandClassName($name)
    {
        $name = \mb_convert_case($name[0], MB_CASE_UPPER) . \mb_substr($name, 1, \mb_strlen($name));

        $namespace = $this->getNamespace();
        $commandName = ucfirst($name);

        $classnameLocal = "\{$namespace}\Commands\{$commandName}Command";
        if (class_exists($classnameLocal)) {
            return $classnameLocal;
        }

        $classnameGlobal = "\Hail\Image\Commands\{$commandName}Command";
        if (class_exists($classnameGlobal)) {
            return $classnameGlobal;
        }

        throw new \Hail\Image\Exception\NotSupportedException(
            "Command ({$name}) is not available for driver ({$namespace})."
        );
    }
219598
public function getClass($name)
    {
        if ($this->hasClasses()) {
            foreach ($this->getClasses() as $class) {
                if ($class->getName() === $name) {
                    return $class;
                }
            }
        }
        return null;
    }
1102370
protected function _completeClassName($name, $className)
    {
        if (isset($this->_definitions[$name])) {
            $definition = $this->_definitions[$name];
        } else {
            return $className;
        }

        if (is_string($definition)) {
            if ($pos = strrpos($definition, '\\')) {
                return substr($definition, 0, $pos + 1) . ucfirst($className);
            } else {
                return $className;
            }
        } elseif (is_array($definition) && isset($definition['class'])) {
            if ($pos = strrpos($definition['class'], '\\')) {
                return substr($definition['class'], 0, $pos + 1) . ucfirst($className);
            } else {
                return $className;
            }
        } else {
            return $className;
        }
    }
44524
protected function getEntityNameSingular()
    {
        $names = explode('\\', $this->getEntityClassName());
        $name = end($names);
        return lcfirst($name);
    }