Returns the module name. Defaults to the module namespace stripped of backslashes.

@return string The Module name
482738
public function getName()
    {
        if (null !== $this->name) {
            return $this->name;
        }

        $this->name = str_replace('\\', '', $this->getNamespace());

        return $this->name;
    }
935194
public function name(): string
    {
        static $name = null;
        if ($name === null) {
            // Extract command name from the class name.
            $class = substr(strrchr(static::class, '\\'), 1);
            $name = CommandLoader::inverseTranslate($class);
        }

        return $name;
    }
968578
public function appNameSpace()
    {
        $app_dir = $this->appDir();
        $root_dir = $this->rootDir();
        $ns_path = substr($app_dir, strlen($root_dir) + 1);
        return str_replace(DS, '\\', $ns_path);
    }
722434
public function getName()
    {
        $nsClass = get_class($this);
        $nsClass = substr($nsClass, strrpos($nsClass, '\\') + 1);
        return $nsClass;
    }
131817
public function getModuleName()
        {
            if (null === $this->_module) {
                $this->_module = $this->getParam($this->getModuleKey());
            }

            return $this->_module;
        }
128790
public function toString()
    {
        if (!$this->getPath()) {
            return '';
        }

        $path = preg_replace('/^\\\/', '', $this->getPath());

        $namespace = $this->getDocBlock()->setTabulation($this->getTabulation())->toString()
            . $this->getTabulationFormatted()
            . 'namespace '
            . $path
            . ';' . PHP_EOL;

        return $namespace;
    }
1184551
public function getModulesIndex()
    {
        if ($this->modulesIndex) {
            return $this->modulesIndex;
        }

        $modules = $this->getModuleManager()->getModules();

        $modulesIndex = [];

        foreach ($modules as $moduleName) {
            $prepareModuleName = rtrim($moduleName, '\\') . '\\';
            $modulesIndex[$prepareModuleName] = strlen($prepareModuleName);
        }

        arsort($modulesIndex, SORT_NUMERIC);
        $this->modulesIndex = $modulesIndex;

        return $this->modulesIndex;
    }
470235
final public function getLongName()
    {
        $name = ($this->module ? $this->module->getName() . '/' : '') . $this->getName();
        return $this->action ? $name . '/' . $this->getAction() : $name;
    }
547475
protected function moduleName(): string
    {
        return $this->moduleName ?? $this->input->getOption('module') ?? $this->moduleName = $this->ask('What is your module?');
    }
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;
    }
276843
public function getFileName() {
        $isTestClass = substr($this->getName(), -4) == 'Test';
        if($isTestClass) {
            $rootDirectory = $this->getConfiguration()->getRootTestDirectory();
        } else {
            $rootDirectory = $this->getConfiguration()->getRootDirectory();
        }
        if(substr($this->getNamespace(), 0, strlen($this->getConfiguration()->getRootNamespace())) != $this->getConfiguration()->getRootNamespace()) {
            throw new \Exception('The Root namespace does not match this classes namespace, could not get the file name'."\n".$this->getNamespace()."\n".$this->getConfiguration()->getRootNamespace());
        }
        if($isTestClass) {
            $namespace = $this->getNamespace();
        } else {
            $namespace = substr($this->getNamespace(), strlen($this->getConfiguration()->getRootNamespace()));
        }
        if(DIRECTORY_SEPARATOR != '\\') {
            $namespace = str_replace('\\', DIRECTORY_SEPARATOR, $namespace);
        }
        return $rootDirectory . DIRECTORY_SEPARATOR . $namespace . DIRECTORY_SEPARATOR . $this->getName() . '.php';
    }
1124920
public function getName()
    {
        if ($this->property->getMultilingual()) {
            return $this->languageNamespace .
            ':' . $this->localization .
            '-' . (null !== $this->additionalPrefix ? $this->additionalPrefix . '-' : '') .
            $this->property->getName();
        } else {
            return (null !== $this->additionalPrefix ? $this->additionalPrefix . '-' : '') . $this->property->getName();
        }
    }
941125
public function getFilename()
    {
        if (is_null($this->filename) === true) {
            $str = new StringWrapper(parent::getFilename());
            $this->filename = $str->deleteSufix('.'.$this->getExtension());
        }

        return $this->filename;
    }
937566
protected function getLoggerModuleNameForType()
    {
        $reflection = new ReflectionClass($this);

        $filename = $reflection->getFileName();
        $match    = str_contains($filename, 'app') ? [1 => 'core'] : null;

        if (!isset($match[1]) and ! preg_match("'src(.*?)src'si", $filename, $match)) {
            throw new Exception('Unable to resolve current module name.');
        }

        if (!isset($match[1])) {
            throw new Exception('Unable to resolve current module namespace.');
        }

        $reserved = [
            'components', 'modules'
        ];

       return str_contains($match[1], 'core')
           ? 'core'
           : trim(str_replace($reserved, '', $match[1]), DIRECTORY_SEPARATOR);
    }
931442
public String getModuleName() {
        if (moduleID != null) {
            return moduleID;
        }

        if (path != null && path.length > MODULE_INDEX)
            return path[1];
        else
            return null;
    }
522488
public function getNamespace()
    {
        if (isset($this->properties[ 'namespace' ])) {
            return $this->properties[ 'namespace' ];
        }

        $dir = $this->getRealPath();
        $dirParts = explode('Widgets' . DIRECTORY_SEPARATOR, $dir);
        $namespace = loader()->getDirNamespace(reset($dirParts)) . 'Widgets\\' . str_replace(['/', DIRECTORY_SEPARATOR],
                '\\', end($dirParts));

        return $namespace;
    }
538169
public function getName()
    {
        $ref = new \ReflectionObject($this);
        $name = $ref->getNamespaceName();
        $name = rtrim($name, '\\');

        return str_replace('\\', '_', strtolower($name));
    }