Gets the base class name for migrations.

@param bool $dropNamespace Return the base migration class name without the namespace.

@return string
17132
public function getMigrationBaseClassName($dropNamespace = true)
    {
        $className = $this->values['migration_base_class'] ?? AbstractMigration::class;

        if ($dropNamespace) {
            return substr(strrchr($className, '\\'), 1) ?: $className;
        }

        return $className;
    }
816174
public function getPathFromNamespace($namespace, $base = null)
    {
        $appNamespace = $this->getAppNamespace();

        // remove the app namespace from the namespace if it is there
        if (substr($namespace, 0, strlen($appNamespace)) == $appNamespace) {
            $namespace = substr($namespace, strlen($appNamespace));
        }

        $path = str_replace('\\', '/', trim($namespace, ' \\'));

        // trim and return the path
        return ($base ?: app_path()).'/'.$path;
    }
840230
private function getFullPathFromNamespace(string $namespace): string
  {
    $file_name = $namespace.$this->extension;
    $full_path = $this->resourceDirFullPath.'/'.$file_name;

    return $full_path;
  }
90470
public function getNamespace($ns) {
    $namespaces = $this
      ->getNamespaces()
      ->filter(function(NamespaceNode $node) use ($ns) {
        return $node->getName()->getPath() === $ns;
      });

    return $namespaces->isEmpty() ? NULL : $namespaces[0];
  }
592028
public function getModelNameAsFQCN($referenceNamespace = null)
    {
        $namespace = $this->getEntityNamespace();
        $fqcn = ($namespace == $referenceNamespace) ? false : true;

        return $fqcn ? $namespace.'\\'.$this->getModelName() : $this->getModelName();
    }
1360115
static function getInstance($namespace = null) {

        $namespace = is_null($namespace) ? static::NAMESPACE_DEFAULT : $namespace;

        if (!array_key_exists($namespace, static::$instances)) {
            self::$instances[$namespace] = new static();
        }

        return self::$instances[$namespace];
    }
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);
    }
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;
    }
585774
private function getByNamespace($namespace)
    {
        $this->checkForNonEmptyNamespace($namespace);

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

        return $this->configurations[$namespace];
    }
246685
public static function getMainNamespaceAndRequest(): string
    {
        if (substr(static::class, 0, strlen(static::BASE_NAMESPACE)) !== static::BASE_NAMESPACE) {
            throw new \Exception("Request must have root namespace of '".static::BASE_NAMESPACE."'");
        }

        return substr(static::class, strlen(static::BASE_NAMESPACE) + 1);
    }
456004
public function getNamespaceForClass(ClassMetadata $classMetadata): string
    {
        return \sprintf('%s\\%s', $this->hydratorNamespace, $classMetadata->reflection->getNamespaceName());
    }
714835
public function getNamespace()
    {
        $name = $this->getNode()->nodeName;
        if (strpos($name, ':') !== false) {
            return implode('', array_slice(explode(':', $name), 0, -1));
        }
        return null;
    }
19673
public function getClassNameWithID($includeNamespace = false)
    {
        $className = static::class;
        
        if (!$includeNamespace) {
            $className = ClassTools::singleton()->getClassWithoutNamespace($className);
        }
        
        return sprintf(
            '%s_%s',
            $className,
            $this->ID
        );
    }
1310653
public function convertNamespaceToPath($namespace)
    {
        // remove the app namespace from the namespace if it is there
        $appNamespace = $this->getAppNamespace();

        if (substr($namespace, 0, strlen($appNamespace)) == $appNamespace) {
            $namespace = substr($namespace, strlen($appNamespace));
        }

        // trim and return the path
        return str_replace('\\', '/', trim($namespace, ' \\'));
    }
566834
protected function removeRootNamespace($classname)
    {
        $namespaces = $this->splitNamespaces($classname);
        if (count($namespaces) > 1) {
            $classname = implode('\\', array_slice($namespaces, 1));
        }

        return $classname;
    }
543848
protected function getClassFileName($base = false)
    {
        return ($base ? $this->getTableFileName(null, array('%entity%' => 'Base'.DIRECTORY_SEPARATOR.'Base'.$this->getModelName())) : $this->getTableFileName());
    }
274266
public function getDisplayName($nameFallback)
    {
        $fileName = $this->fileName;

        if (substr($fileName, -5) == '.yaml') {
            $fileName = substr($fileName, 0, -5);
        }

        if (!strlen($fileName)) {
            $fileName = $nameFallback;
        }

        return $this->getModelClassName().'/'.$fileName;
    }