Answers the class name and ID of the object as a string.

@param boolean $includeNamespace If true, also include the namespace of the object.

@return string
19673
public function getClassNameWithID($includeNamespace = false)
    {
        $className = static::class;
        
        if (!$includeNamespace) {
            $className = ClassTools::singleton()->getClassWithoutNamespace($className);
        }
        
        return sprintf(
            '%s_%s',
            $className,
            $this->ID
        );
    }
22049
public function getNamespace(): string
    {
        if(null === $this->namespace)
        {
            $this->namespace = str_replace(DIRECTORY_SEPARATOR, '\\', dirname(str_replace('\\', DIRECTORY_SEPARATOR, static::class)));
        }
        return $this->namespace;
    }
569298
public static function getRealNamespace($class)
    {
        if (($lastNsPos = strrpos($realClass = self::getRealClass($class), '\\')) !== false) {
            return substr($realClass, 0, $lastNsPos);
        }
    }
240802
protected function getClassNamesInNamespace($namespace)
    {
        $affectedViewHelperClassNames = array();

        $allViewHelperClassNames = $this->reflectionService->getAllSubClassNamesForClass(\TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper::class);
        foreach ($allViewHelperClassNames as $viewHelperClassName) {
            if ($this->reflectionService->isClassAbstract($viewHelperClassName)) {
                continue;
            }
            if (strncmp($namespace, $viewHelperClassName, strlen($namespace)) === 0) {
                $affectedViewHelperClassNames[] = $viewHelperClassName;
            }
        }
        sort($affectedViewHelperClassNames);
        return $affectedViewHelperClassNames;
    }
114387
final public function getNamespace(): string
    {
        if (null === $this->namespace) {
            $pos             = strrpos(static::class, '\\');
            $this->namespace = false === $pos ? '' : substr(static::class, 0, $pos);
        }

        return $this->namespace;
    }
229022
public function toNamespacedString($namespace, array $aliased_classes, $this_class, $use_phpdoc_format)
    {
        if ($use_phpdoc_format) {
            return 'object';
        }

        return 'object{' .
                implode(
                    ', ',
                    array_map(
                        /**
                         * @param  string|int $name
                         * @param  Union  $type
                         *
                         * @return string
                         */
                        function (
                            $name,
                            Union $type
                        ) use (
                            $namespace,
                            $aliased_classes,
                            $this_class,
                            $use_phpdoc_format
                        ) {
                            return $name . ($type->possibly_undefined ? '?' : '') . ':' . $type->toNamespacedString(
                                $namespace,
                                $aliased_classes,
                                $this_class,
                                $use_phpdoc_format
                            );
                        },
                        array_keys($this->properties),
                        $this->properties
                    )
                ) .
                '}';
    }
743551
public function toPhpString(
        $namespace,
        array $aliased_classes,
        $this_class,
        $php_major_version,
        $php_minor_version
    ) {
        return parent::toNamespacedString($namespace, $aliased_classes, $this_class, false);
    }
585774
private function getByNamespace($namespace)
    {
        $this->checkForNonEmptyNamespace($namespace);

        if (!isset($this->configurations[$namespace])) {
            $this->configurations[$namespace]
                = $this->retrieveConfigurationFromTypoScriptSetup($namespace);
        }

        return $this->configurations[$namespace];
    }
947882
protected function getNamespace($name)
    {
        $name = explode('\\', $name);
        
        unset($name[(count($name) - 1)]);

        $nameSpace = implode('\\', $name);

        return trim($nameSpace);
    }
986491
public function getPrefixForDocumentNamespace( $namespace )
	{
		if ( is_null( $this->cacheDocumentNamespaces ) )
		{
			$this->cacheDocumentNamespaces = array_flip( $this->instance_xml->getDocNamespaces() );
			// If the default namespace is one of the standards ones then the prefix may be missing
			$standardNamespaces = array_flip( XBRL_Constants::$standardPrefixes );
			$docNamespace = array_search( '', $this->cacheDocumentNamespaces );
			if ( $docNamespace )
			{
				if ( isset( $standardNamespaces[ $docNamespace ] ) )
				{
					$this->cacheDocumentNamespaces[ $docNamespace ] = $standardNamespaces[ $docNamespace ];
				}
				else
				{
					// Get the namespace for the respective namespace
					$taxonomy = $this->getInstanceTaxonomy()->getTaxonomyForNamespace( $docNamespace );
					if ( $taxonomy )
					{
						$this->cacheDocumentNamespaces[ $docNamespace ] = $taxonomy->getPrefix();
					}
				}
			}
		}

		return isset( $this->cacheDocumentNamespaces[ $namespace ] )
			? $this->cacheDocumentNamespaces[ $namespace ]
			: false;
	}
792361
protected function getClassNamesInNamespace($namespace)
    {
        $affectedViewHelperClassNames = [];

        $allViewHelperClassNames = $this->reflectionService->getAllSubClassNamesForClass(AbstractViewHelper::class);
        foreach ($allViewHelperClassNames as $viewHelperClassName) {
            if ($this->reflectionService->isClassAbstract($viewHelperClassName)) {
                continue;
            }
            if (strncmp($namespace, $viewHelperClassName, strlen($namespace)) === 0) {
                $affectedViewHelperClassNames[] = $viewHelperClassName;
            }
        }
        sort($affectedViewHelperClassNames);
        return $affectedViewHelperClassNames;
    }
917747
private static function classBelongsToNamespace($className, $namespaces)
    {
        $belongsToNamespace = false;
        $check = array_values($namespaces);
        $lcClassName = strtolower(ltrim($className, '\\'));

        foreach ($check as $namespace) {
            if (false !== strpos($lcClassName, strtolower($namespace))) {
                $belongsToNamespace = true;
                continue;
            }
        }
        return $belongsToNamespace;
    }
1154700
public function findNamespace(string $namespace): string
	{
		$allNamespaces = $this->getNamespaces();

		$expr = preg_replace_callback(
			'{([^:]+|)}',
			function ($matches)
			{
				return preg_quote($matches[1]) . '[^:]*';
			},
			$namespace
		);

		$namespaces = preg_grep('{^' . $expr . '}', $allNamespaces);

		if (empty($namespaces))
		{
			throw new NamespaceNotFoundException(sprintf('There are no commands defined in the "%s" namespace.', $namespace));
		}

		$exact = \in_array($namespace, $namespaces, true);

		if (\count($namespaces) > 1 && !$exact)
		{
			throw new NamespaceNotFoundException(sprintf('The namespace "%s" is ambiguous.', $namespace));
		}

		return $exact ? $namespace : reset($namespaces);
	}
288665
private function setNamespaceKey($namespace) {

        $uId = UniqueId::generate(64);

        return $this->getInstance()->set($namespace, $uId, 0) === false ? false : $uId;

    }
995362
public function getNamespaceName()
    {
        $caller = get_called_class();
        $parts  = explode('\\', $caller);
        array_pop($parts);
        
        return join('\\', $parts);
    }
1175475
public function convertToClassName ($table, $namespace = 'Sonic\\Model\\')
	{
		
		$arr		= explode ('_', $table);
		
		foreach ($arr as &$val)
		{
			$val = ucfirst (strtolower ($val));
		}
		
		return $namespace . implode ('\\', $arr);
		
	}
267420
public function toNamespacedString($namespace, array $aliased_classes, $this_class, $use_phpdoc_format)
    {
        $printed_int = false;
        $printed_float = false;
        $printed_string = false;

        $s = '';

        foreach ($this->types as $type) {
            if ($type instanceof TLiteralFloat) {
                if ($printed_float) {
                    continue;
                }

                $printed_float = true;
            } elseif ($type instanceof TLiteralString) {
                if ($printed_string) {
                    continue;
                }

                $printed_string = true;
            } elseif ($type instanceof TLiteralInt) {
                if ($printed_int) {
                    continue;
                }

                $printed_int = true;
            }

            $s .= $type->toNamespacedString($namespace, $aliased_classes, $this_class, $use_phpdoc_format) . '|';
        }

        return substr($s, 0, -1) ?: '';
    }