Get the module name for the class.

@return string
547475
protected function moduleName(): string
    {
        return $this->moduleName ?? $this->input->getOption('module') ?? $this->moduleName = $this->ask('What is your module?');
    }
1317063
public function getName()
    {
        if (!$this->_name) {
            $class = Type::short($this);
            $this->_name = Helper::rtrimWord(Type::snake_case($class, '-'), '-type');
        }

        return $this->_name;

    }
810365
public function getModuleByClassName($className)
    {
        $longest = 0;
        $foundModule = false;
        
        $className = Framework::prepareClassName($className);
        
        foreach ($this->modules as $moduleNamespace => $module) {
            $moduleNamespace = Framework::prepareNamespace($moduleNamespace);
            $sameNamespace = strpos($className, $moduleNamespace);
            $length = strlen($moduleNamespace);

            if ($sameNamespace !== false && $length > $longest) {
                $longest = $length;
                $foundModule = $module;
            }
        }
        
        return $foundModule;
    }
575541
private function getCurrentVendorAndModuleName()
	{
		$composerDotJson = json_decode( file_get_contents( base_path('composer.json') ) );
		$psr4Autoload = $composerDotJson->autoload->{'psr-4'};
		$name = null;
		foreach( $psr4Autoload as $nameSpace => $folder ) {
			if( $folder == 'app/' ) {
				$name = $nameSpace;
				break;
			}
		}
		if( is_null( $name ) ) {
			$this->error('Could not find namespace from composer.json');
		}
		if( ! preg_match( "#^([a-z0-9]+)\\\([a-z0-9]+)\\\\$#is", $name, $match ) ) {
			$this->error('Could not find namespace from composer.json');
		}
		return [
			'vendor' => $this->getComputerNameFromCamelCase($match[1]),
			'module' => $this->getComputerNameFromCamelCase($match[2]),
			'camelCasedVendor' => $match[1],
			'camelCasedModule' => $match[2]
		];
	}
469026
private function _getShortClassname()
    {
        if( $this->_shortClassName )
            return $this->_shortClassName;

        $this->_shortClassName = substr( $this->_getFullClassname(), strrpos( $this->_getFullClassname(), '\\' ) + 1 );

        return $this->_shortClassName;
    }
758104
public function getName()
    {
        if ($this->name === null) {
            $class = get_called_class();
            if (preg_match('/_+(.+)_+/', $class, $matches) > 0) {
                $this->name = $matches[1];
            } else {
                $this->name = '';
            }
        }

        return $this->name;
    }
873355
public function getName()
	{
		$class = get_class($this);

		$class = explode('\\', $class);

		$class = $class[count($class) - 1];

		$class = str_replace(array('Supra', 'Package'), '', $class);

		$inflector = new Inflector();
		$name = $inflector->tableize($class);

		return $name;
	}
855930
protected function getChildName()
    {
        if ($this->childname === null) {
            $classname = get_class($this);
            $pos = max(strrpos($classname, '_Array'), strrpos($classname, '\ArrayObject'));
            $this->childname = substr($classname, 0, $pos);
        }
        return $this->childname;
    }
198677
private function getClassName()
    {
        if (null === $this->className) {
            $this->className = get_class($this);
        }

        return $this->className;
    }
982637
public function getName(): string
	{
		if( !$this->name )
		{
			$name = $this->getModule()->getKey();
			if( preg_match('/Controllers\\\\(.*?)$/', static::class, $e ) )
			{
				$name .= '::' . preg_replace_callback( '/[A-Z]/', static function( $m ) { return '_' . lcfirst( $m[0] ); }, lcfirst( $e[1] ) );
				$name  = str_replace( '\\', ':', $name );
			}
			$this->name = strtolower( $name );
		}

		return $this->name;
	}
782858
protected function get_module_name() {
        if (isset(self::$modulename)) {
            return self::$modulename;
        }
        self::$modulename = get_string('modulename', 'assign');
        return self::$modulename;
    }
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;
    }
184761
protected static function getClassname()
    {
        $className = explode('\\', get_called_class());
        $className = array_pop($className);

        return str_replace('_', '-', strtolower($className));
    }
1272382
public function getPackageName(): string
	{
		if( $this->module_id > 0 )
		{
			$module = $this->getModule();
			if( strpos($this->class_name, "\\") === false )
			{
				$this->class_name = $module->getNamespace() . "Plugin\\" . $this->class_name;
			}
			return $module->getName();
		}
		else
		{
			return $this->name;
		}
	}
1338781
private function _getFullClassname()
    {
        if( $this->_fullClassName )
            return $this->_fullClassName;

        $this->_fullClassName = get_called_class();

        if( strpos( $this->_fullClassName, '__CG__' ) !== false )
            $this->_fullClassName = substr( $this->_fullClassName, strpos( $this->_fullClassName, '__CG__' ) + 6 );

        return $this->_fullClassName;
    }
656056
public function getName() {
		if ($this->_name === null) {
			$name = get_class($this);
			$pos = strrpos($name, '\\');
			if ($pos !== false) {
				$name = substr($name, $pos + 1);
			}
			if (preg_match('/^Twig([A-Za-z]+)Extension$/', $name, $matches)) {
				$name = $matches[1];
			}
			$this->_name = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $name));
		}
		return $this->_name;
	}
982959
public function getModuleNamespace()
    {
        if (!$this->module || '\\' == $this->module || '/' == $this->module) {
            return '\app';
        }
        if (isset($this->modules[$this->module]['namespace'])) {
            return $this->modules[$this->module]['namespace'];
        }
        return '\app\modules\\' . $this->module;
    }