Generates a search class name from the specified model class name.
@param string $modelClassName model class name
@return string generated class name
190284
protected function generateSearchClassName($modelClassName)
    {
        $searchClassName = $this->searchModelClass;
        if (empty($searchClassName) || strpos($this->tableName, '*') !== false) {
            $searchClassName = $modelClassName;
        }
        return $searchClassName;
    }
1266736
public static function classToIndex($className)
    {
        if (false === is_string($className)) {
            return '';
        }
        $modelClass = strtolower($className);
        return StringHelper::basename($modelClass);
    }
849649
public function getClassByName($className)
    {
        $classMap = $this->getClassMap($this->splitClassName($className)) . "[\"__class\"]";
        $return = null;

        eval(
            "if (isset(\$this->indexedClasses$classMap)) {"
            . " \$return = \$this->indexedClasses$classMap;"
            . "}"
        );

        return $return;
    }
176384
protected function getModelPath($modelName)
    {
        $inputName = explode('/', ucfirst($modelName));
        array_pop($inputName);

        return implode('/', $inputName);
    }
543560
private function getClassName($methodName)
    {
        $parts = explode($this->separator, $methodName);
        array_pop($parts); // Remove method

        foreach ($parts as &$part) {
            $part = ucwords($part);
        }

        return $this->namespace . join('\\', $parts);
    }
578943
private function getShortName($className)
    {
        if (strpos($className, "\\") === false) {
            return strtolower($className);
        }

        $parts = explode("\\", $className);
        return strtolower(end($parts));
    }
888394
public function getSort($className='CSort')
	{
		if(($sort=parent::getSort($className))!==false)
			$sort->modelClass=$this->modelClass;
		return $sort;
	}
932607
public function getFieldName($field, $modelName)
    {
        if (isset($this->_unionMapsTo[$modelName][$field])) {
            return $this->_unionMapsTo[$modelName][$field];
        }

        return $field;
    }
454775
public function getClassPropertyNames($className)
    {
        $className = $this->prepareClassReflectionForUsage($className);
        return isset($this->classReflectionData[$className][self::DATA_CLASS_PROPERTIES]) ? array_keys($this->classReflectionData[$className][self::DATA_CLASS_PROPERTIES]) : [];
    }
235104
public static function getAllRelationshipsForModel($modelClassName)
    {
        $modelClassName = self::getModelClass($modelClassName);

        if (!isset(self::$relationshipCache[$modelClassName])) {
            $schemas = self::getAllSchemas();
            $relationships = [];

            foreach ($schemas as $schema) {
                if (isset($schema->relationships[$modelClassName])) {
                    $relationships = array_merge($relationships, $schema->relationships[$modelClassName]);
                }
            }

            self::$relationshipCache[$modelClassName] = $relationships;
        }

        return self::$relationshipCache[$modelClassName];
    }
835766
public function getClassDefinition($className)
    {
        foreach ($this->definitions as $key => $value) {
            if (!strcasecmp($key, $className)) {
                return $value;
            }
        }

        return false;
    }
1313858
public function getIdByClassName($className)
    {
        $classId = $this->getClassIdFromShopMap($className);

        if (empty($classId)) {
            $classId = $this->getClassIdFromModuleMap($className);
        }
        return $classId;
    }
80489
private function getRealClassName(string $className): string
    {
        // __CG__: Doctrine Common Marker for Proxy (ODM < 2.0 and ORM < 3.0)
        // __PM__: Ocramius Proxy Manager (ODM >= 2.0)
        if ((false === $positionCg = strrpos($className, '\\__CG__\\')) &&
            (false === $positionPm = strrpos($className, '\\__PM__\\'))) {
            return $className;
        }

        if (false !== $positionCg) {
            return substr($className, $positionCg + 8);
        }

        $className = ltrim($className, '\\');

        return substr(
            $className,
            8 + $positionPm,
            strrpos($className, '\\') - ($positionPm + 8)
        );
    }
60546
protected function generateClassName($indexName)
    {
        if (isset($this->_classNames[$indexName])) {
            return $this->_classNames[$indexName];
        }

        if (($pos = strrpos($indexName, '.')) !== false) {
            $indexName = substr($indexName, $pos + 1);
        }

        $db = $this->getDbConnection();
        $patterns = [];
        $patterns[] = "/^{$db->tablePrefix}(.*?)$/";
        $patterns[] = "/^(.*?){$db->tablePrefix}$/";
        if (strpos($this->indexName, '*') !== false) {
            $pattern = $this->indexName;
            if (($pos = strrpos($pattern, '.')) !== false) {
                $pattern = substr($pattern, $pos + 1);
            }
            $patterns[] = '/^' . str_replace('*', '(\w+)', $pattern) . '$/';
        }
        $className = $indexName;
        foreach ($patterns as $pattern) {
            if (preg_match($pattern, $indexName, $matches)) {
                $className = $matches[1];
                break;
            }
        }

        return $this->_classNames[$indexName] = Inflector::id2camel($className, '_');
    }
1121015
protected function modelClassName($strTableName)
    {
        $strTableName = $this->stripPrefixFromTable($strTableName);
        return sprintf('%s%s%s',
            $this->strClassPrefix,
            QString::camelCaseFromUnderscore($strTableName),
            $this->strClassSuffix);
    }
467099
public static function getClassBaseName($className): string
    {
        $className = ToString::toString($className);
        if (\preg_match('~\\\(?<basename>[^\\\]+)$~u', $className, $matches) === 0) {
            return $className; // no namespace at all
        }

        return $matches['basename']; // without namespace
    }
262330
protected function getModelNamespace($modelName, $modelDirectory)
    {
        if (!empty($modelDirectory)) {
            $modelDirectory = str_finish($modelDirectory, '\\');
        }

        $namespace = Helpers::getAppNamespace() . ltrim(Config::getModelsPath($modelDirectory . $modelName), '\\');

        return rtrim(Helpers::convertSlashToBackslash($namespace), '\\');
    }