Return name in class or try to get from class name

@return string
543930
public function getDbTableName(): string
    {
        // Name set in class
        if ($this->db_table) {
            return $this->db_table;
        }

        $db_table_from_class = mb_strtolower(Converter::fromCamelCase(str_replace([self::CLASS_RELATION_NAME_ENTITY, self::CLASS_RELATION_NAME_REPOSITORY], '', $this->getUnqualifiedShortClassName()))) . 's';

        // Check DB in system tables
        $this->db_table = 'cms_' . $db_table_from_class;
        if (!SQL::getInstance()->tableExists($this->db_table)) {
            // Or in module tables
            $this->db_table = 'm_' . $db_table_from_class;
        }

        return $this->db_table;
    }
770770
protected function getNameInput()
    {
        $name = trim($this->argument('name'));

        $this->type = $this->qualifyClass($name);

        return $name;
    }
709699
protected function getClassNameSuffix()
    {
        $suffix = $this->input->getOption('suffix');

        if (empty($suffix)) {
            $suffix = $this->classNameSuffix;
        }

        return $suffix;
    }
17143
private function classGet()
    {
        return isset( $this->class )
            ? $this->class
            : (
                  ( $firstElement = $this->firstElementGet() )
                ? ( $this->class = get_class( $firstElement ) )
                : null
              )
            ;
    }
103325
def _classname(self):
        """"""
        if self.__class__.__module__ in (None,):
            return self.__class__.__name__
        else:
            return "%s.%s" % (self.__class__.__module__, self.__class__.__name__)
190937
public function getName()
    {
        $returnValue = (string) '';

        if (!empty($this->name)){
        	$returnValue = $this->name;
        }
        else{
        	$returnValue = null;
        }

        return (string) $returnValue;
    }
43272
private function getClass()
    {
        $parts = $this->explodeCallable($this->handler);

        if ($this->isStaticMethod()) {
            return $parts[0];
        }

        return get_class($parts[0]);
    }
1194172
public function getClassNameWithoutNamespace()
    {
        if ($this->classNameWithoutNamespace === null) {
            $class = explode('\\', get_class($this));
            $this->classNameWithoutNamespace = substr(end($class), 0, -10);
        }
        return $this->classNameWithoutNamespace;
    }
582832
public function getName() {

		$name = '';

		foreach ( $this->caches as $cache ) {
			$name = $name . '::' . $cache->getName();
		}

		return __CLASS__ . $name;
	}
822352
function getLabel()
    {
        if ($this->filtername)
            return $this->filtername;

        $className = explode('\\', get_class($this));
        $className = $className[count($className)-1];

        return $className.'.*';
    }
143501
protected function getName(): string
    {
        if (!isset($this->name) || !$this->name) {
            $this->name = @stream_socket_get_name($this->socket, true);
        }
        return $this->name;
    }
366973
public function getClassName()
    {
        $name = str_replace('.', ' ', $this->name);
        $name = str_replace(':', ' pseudo-class-', $name);
        return trim($name);
    }
198677
private function getClassName()
    {
        if (null === $this->className) {
            $this->className = get_class($this);
        }

        return $this->className;
    }
277358
public function getName()
	{
		if (empty($this->name))
		{
			$reflect = new \ReflectionClass($this);

			$this->name = strtolower(str_replace('Driver', '', $reflect->getShortName()));
		}

		return $this->name;
	}
698525
public function getPhpName()
    {
        if ($this->phpName === null) {
            $inputs = array();
            $inputs[] = $this->getStdSeparatedName();
            $inputs[] = $this->phpNamingMethod;
            try {
                $this->phpName = NameFactory::generateName(NameFactory::PHP_GENERATOR, $inputs);
            } catch (EngineException $e) {
                print $e->getMessage() . "\n";
                print $e->getTraceAsString();
            }
        }

        return $this->phpName;
    }
1317063
public function getName()
    {
        if (!$this->_name) {
            $class = Type::short($this);
            $this->_name = Helper::rtrimWord(Type::snake_case($class, '-'), '-type');
        }

        return $this->_name;

    }
120781
public function getName()
	{
		if (empty($this->_name))
		{
			$this->_name = \App::get('request')->getCmd('controller');

			if (!$this->_name)
			{
				$r = null;

				if (!preg_match('/View((view)*(.*(view)?.*))$/i', get_class($this), $r))
				{
					throw new Exception('Cannot get or parse view class name.', 500);
				}

				if (strpos($r[3], 'view'))
				{
					throw new Exception('Classname contains the substring "view" which causes problems when extracting the classname.', 500);
				}

				$this->_name = strtolower($r[3]);
			}
		}
		return $this->_name;
	}