Generates time sortable ID.

@param string $className
@return string
503677
public static function generateId($className = '')
	{
		// TODO: on 32bit systems this might generate low precision hashes due to float number usage in the base_convert function
		$timeParts = explode(' ', microtime(false));
		$timeParts[0] = substr($timeParts[0], 2, 3);
		$time = ((int) $timeParts[1] - 1324027985) . $timeParts[0];
		$time = base_convert($time, 10, 36);
		$time = substr($time, -9);
		$time = str_pad($time, 9, '0', STR_PAD_LEFT);

		// Local sequence usage
		$sequence = base_convert(self::$idSequence++, 10, 36);
		$sequence = substr($sequence, -2);
		$sequence = str_pad($sequence, 2, '0', STR_PAD_LEFT);

		$random = sha1(uniqid($className, true));
		$random = base_convert($random, 16, 36);
		$random = substr($random, -9);
		$random = str_pad($random, 9, '0', STR_PAD_LEFT);

		return $time . $sequence . $random;
	}
700519
public static function oldClassName($className)
    {
        // If class name has first symbol as NS_SEPARATOR - remove it to avoid ugly classes _samson_core_...
        if ($className{0} == self::NS_SEPARATOR) {
            $className = substr($className, 1);
        }

        // Convert NS_SEPARATOR to namespace
        return strtolower(str_replace(self::NS_SEPARATOR, '_', $className));
    }
1182590
public function getSorting(string $className): ListOfType
    {
        /** @var InputObjectType $type */
        $type = $this->getViaFactory($className, Utils::getTypeName($className) . 'Sorting', $this->sortingTypeFactory);

        return Type::listOf(Type::nonNull($type));
    }
1238711
public function get($className)
    {
        if (isset($this->_footprints[$className])) {
            return $this->_footprints[$className];
        }

        if (isset($this->_data[$className])) {
            $data = $this->_data[$className];
            $footprint = new ClassFootprint($data);
        } else {
            $footprint = new ClassFootprint();
            if (preg_match($this->_interfaceRegex, $className)) {
                $footprint->setType(ClassFootprint::TYPE_INTERFACE);
            }
        }
        $this->addFootprint($className, $footprint);

        return $footprint;
    }
211991
protected function generateClassName($tableName)
    {
        if (isset($this->_classNames[$tableName])) {
            return $this->_classNames[$tableName];
        }

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

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

        return $this->_classNames[$tableName] = Inflector::id2camel($className, '_');
    }
682395
protected function getClassName($className) {
        if (strpos($className, ':') !== false) {
           list($namespaceAlias, $simpleClassName) = explode(':', $className);
           $className = $this->doctrine->getManager()->getConfiguration()
               ->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName;
        }
        return $className;
    }
929766
private function getCustomSortingNames(string $className): array
    {
        $this->fillCache($className);

        return array_keys($this->customSortings[$className]);
    }
684235
public static function getClassName($className) {
    if (is_object($className)) $className = self::getClass($className);
    
    $c = $className;
    if (mb_strpos($className,'\\') !== FALSE) {
      $p = explode('\\',$className);
      $c = array_pop($p);
    }
    return $c;
  }
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, '_');
    }
1266736
public static function classToIndex($className)
    {
        if (false === is_string($className)) {
            return '';
        }
        $modelClass = strtolower($className);
        return StringHelper::basename($modelClass);
    }
888394
public function getSort($className='CSort')
	{
		if(($sort=parent::getSort($className))!==false)
			$sort->modelClass=$this->modelClass;
		return $sort;
	}
902589
public function getCustomSorting(string $className, string $name): ?SortingInterface
    {
        $this->fillCache($className);

        return $this->customSortings[$className][$name] ?? null;
    }
632050
protected final function fileName(string $className): string
    {
        $fileName = "";
        $prefix = $className;
        while (($lastPrPos = strrpos($prefix, "\\"))) {
            $prefix = substr($className, 0, $lastPrPos + 1);
            $relativeClass = substr($className, $lastPrPos + 1);
            if (array_key_exists($prefix, $this->prefix)
             && ($fileName = $this->find($prefix, $relativeClass))) {
                break;
            }
            $prefix = rtrim($prefix, "\\");
        }
        return $fileName;
    }
1165972
public function clearIndices($className)
    {
        $this->checkImplementsSearchableInterface($className);
        /** @var SearchableInterface $activeRecord */
        $activeRecord = $this->activeRecordFactory->make($className);
        $indices = $indices = $this->initIndices($activeRecord);

        return $this->processIndices($indices, function (Index $index) {
            return $index->clearIndex();
        });
    }
969781
protected function getTypeForClassName($className)
    {
        if (empty($this->rootNamespace)) {
            return $className;
        }
        return $this->stripNamespace($this->rootNamespace, $className);
    }
717990
public static function tableize($className)
    {
        $result = self::underscore($className);

        if (!self::isPlural($className)) {
            $result = self::pluralize($result);
        }
        return $result;
    }
622819
public static function setDateTimeClassName(string $className)
    {
        if(!class_exists($className)) {
            throw new \InvalidArgumentException($className . ' does not exist');
        }

        self::$_dateTimeClassName = $className;
    }