Work out name space of the class

@param string $name
@return string
550548
public function getNameSpace(string $name) : string
    {
        $segs = [];
        $name = str_replace("/", "\\", $name);
        $namespace = explode("\\", $name);
        array_pop($namespace);

        array_walk($namespace, function (&$value) {
            $value = $this->removeNoneAlpherNumeric($value);
        });

        return implode("\\", $namespace);
    }
857990
public static function denamespace($class_name)
	{
		$class_name = trim($class_name, '\\');
		if ($last_separator = strrpos($class_name, '\\'))
		{
			$class_name = substr($class_name, $last_separator + 1);
		}
		return $class_name;
	}
560969
protected function getNamespaceFromClassname($class_name)
    {
        $parts = collect(explode('\\', trim($class_name, '\\')));
        $parts->pop();
        return '\\' . $parts->implode('\\');
    }
1124901
protected function formatGatewayClassName($name)
    {
        if (class_exists($name)) {
            return $name;
        }

        $name = $this->camelCase($name);

        return __NAMESPACE__."\\Gateways\\{$name}Gateway";
    }
651508
protected function parseName($name)
	{
		$rootNamespace = $this->getAppNamespace();

		if (starts_with($name, $rootNamespace))
		{
			return $name;
		}

		if (str_contains($name, '/'))
		{
			$name = str_replace('/', '\\', $name);
		}

		return $this->parseName($this->getDefaultNamespace(trim($rootNamespace, '\\')).'\\'.$name);
	}
777386
static function formatClassName ($name)
  {
    $n = explode ('\\', $name);
    $c = array_pop ($n);
    return sprintf ("<span class='__type hint--rounded hint--top' data-hint='%s'>%s</span>", $name, $c);
  }
908971
protected function parseName($name)
    {
        $rootNamespace = $this->container->getNamespace();

        if (Str::startsWith($name, $rootNamespace)) {
            return $name;
        }

        if (Str::contains($name, '/')) {
            $name = str_replace('/', '\\', $name);
        }

        return $this->parseName($this->getDefaultNamespace(trim($rootNamespace, '\\')) .'\\' .$name);
    }
1019116
public static function getNamespace($className)
        {
            $className = trim($className, '\\');

            if ($lastSeparator = strrpos($className, '\\')) {
                return substr($className, 0, $lastSeparator + 1);
            }

            return '';
        }
1313124
public static function getOnlyNameSpace($className)
    {
        // Try to find namespace separator
        if (($p = strrpos($className, self::NS_SEPARATOR)) !== false) {
            $className = substr($className, 0, $p);
        }

        return $className;
    }
663073
public static function getClassNameFromFQN(string $name): string
    {
        $arr = explode('\\', $name);

        return (string)array_pop($arr);
    }
855078
protected function normalizeName($name)
	{
		$delimiter = ViewFinderInterface::HINT_PATH_DELIMITER;

		if (strpos($name, $delimiter) === false)
		{
			return str_replace('/', '.', $name);
		}

		list($namespace, $name) = explode($delimiter, $name);

		return $namespace . $delimiter . str_replace('/', '.', $name);
	}
977459
public function getSeederName($name)
    {
        $name = Str::studly($name);

        $namespace = $this->laravel['modules']->config('namespace');
        $seederPath = GenerateConfigReader::read('seeder');
        $seederPath = str_replace('/', '\\', $seederPath->getPath());

        return $namespace . '\\' . $name . '\\' . $seederPath . '\\' . $name . 'DatabaseSeeder';
    }
1176882
public function getNamespace($class_name)
	{
		$class_name = trim($class_name, '\\');
		if ($last_separator = strrpos($class_name, '\\'))
		{
			return substr($class_name, 0, $last_separator + 1);
		}
		return '';
	}
134871
public function getClassName($name)
    {
        $name = $this->_formatName($name);
        if ($this->_useStaticRegistry
            && isset(self::$_staticLoadedPlugins[$this->_useStaticRegistry][$name])
        ) {
            return self::$_staticLoadedPlugins[$this->_useStaticRegistry][$name];
        } elseif (isset($this->_loadedPlugins[$name])) {
            return $this->_loadedPlugins[$name];
        }

        return false;
    }
714237
protected function getNamespace() {
		$np = explode('\\', $this->getClass());
		unset($np[count($np) - 1]);
		return join('\\', $np);
	}
1255297
protected function getPropertyClassName($name)
    {
        $name = ucfirst($name);
        if (!$this->php7ClassNames) {
            return $name;
        }

        if (substr($name, -8) == 'Property') {
            return $name;
        }

        return $name.'Property';
    }
950406
public function get_namespace($name = null)
    {
        $ns = $this->namespace;

        if ($name) {
            // an alias for BC
            if ($name == 'prefix') {
                $name = 'prefix_in';
            }

            return isset($ns[$name]) ? $ns[$name] : null;
        }

        unset($ns['prefix_in'], $ns['prefix_out']);

        return $ns;
    }