Gets the version string of the schema the specified class was generated from.

@param string $className The name of the class to get the model version from.
@return string The version string for the schema model the class was generated from.
424829
public function getModelVersion($className) {
        $version = '1.0';
        $className= $this->loadClass($className);
        if ($className && isset($this->map[$className]['version'])) {
            $version= $this->map[$className]['version'];
        }
        return $version;
    }
932549
public static function getModelClass($name)
    {
        // If the name contains a backslash it is already fully qualified. However in some cases
        // a model might be replaced by a new class and so we must first look to see if this model is
        // mapped and if so return it's replacement instead.
        if (stripos($name, "\\") !== false) {
            $newName = self::getModelNameFromClass($name);

            if ($newName === null) {
                // $name hasn't been registered as a model object. Play safe and return the
                // same class name passed to us.
                return '\\' . ltrim($name, '\\');
            }

            $name = $newName;
        }

        if (self::$modelClassesCache == null) {
            self::$modelClassesCache = [];

            $schemas = self::getAllSchemas();

            self::$modelNamesCache = [];

            foreach ($schemas as $schema) {
                self::$modelClassesCache = array_merge(self::$modelClassesCache, $schema->models);
                self::$modelNamesCache = array_merge(self::$modelNamesCache, $schema->modelClassNames);
            }
        }

        if (isset(self::$modelClassesCache[$name])) {
            return '\\' . ltrim(self::$modelClassesCache[$name], '\\');
        }

        return null;
    }
58410
public static function getClassName($className)
    {
        if (is_object($className)) {
            $className = get_class($className);
        }
        $className = array_slice(explode('\\', $className), - 1);
        return $className[0];
    }
81084
public function getMetadataForClass($className)
    {
        if (!class_exists($className)) {
            throw new \Exception("Class $className does not exist!");
        }
        if (isset($this->loadedMetadatas[$className])) {
            return $this->loadedMetadatas[$className];
        }

        return $this->loadedMetadatas[$className] = $this->loadMetadataForClass($className, $this->annotationReader);
    }
907171
protected function getClassMetadata($className)
    {
        $class = clone $this->em->getClassMetadata($className);

        if (! isset($class->fieldMappings['revisionId'])) {
            $revisionMapping = [
                'fieldName' => 'revisionId',
                'columnName' => 'revision_id',
                'type' => 'integer',
            ];

            $class->mapField($revisionMapping);

            $revisionMapping = [
                'fieldName' => 'revisionType',
                'columnName' => 'rev_type',
                'type' => 'string',
            ];

            $class->mapField($revisionMapping);

            $revisionMapping = [
                'fieldName' => 'draft',
                'columnName' => 'draft',
                'type' => 'boolean',
            ];

            $class->mapField($revisionMapping);
        }

        return $class;
    }
1349034
public function getModuleNameByClassName($className)
    {
        $resultModuleName = $this->autoDetectModuleNameByClassName($className);
        if (null === $resultModuleName) {
            $errMsg = sprintf('Unable to determine the module name for a class of %s', $className);
            throw new Exception\ResolveModuleNameException($errMsg);
        }

        return $resultModuleName;
    }
369870
public function getDocument($className)
    {
        if (isset($this->documents[$className])) {
            return $this->documents[$className];
        }
        if (!isset($this->mappings[$className])) {
            throw new \InvalidArgumentException(sprintf('No mapping found for document "%s"', $className));
        }

        return $this->documents[$className] = $this->processDocument(
            $className,
            $this->mappings[$className]['doctrine'],
            $this->mappings[$className]['serializer'],
            $this->mappings[$className]['schema']
        );
    }
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));
    }
1011232
protected static function getClassName($className) {
		if (class_exists($className)) {
			while (class_exists('ux_' . $className, FALSE)) {
				$className = 'ux_' . $className;
			}
		}

		return $className;
	}
119891
protected function getIdentifierRepository($className)
    {
        $class = $this->getClassMetadata($className);

        return $this->pool->getManager($class->getManagerIdentifier())->getRepository($class->getFieldMapping($class->getManagerIdentifier())->getName());
    }
21905
public function getRepository($className)
    {
        if (!is_string($className)) {
            throw new \InvalidArgumentException(sprintf('Class name must be a string, "%s" given.',
                is_object($className) ? 'Object ' . get_class($className) : gettype($className)
            ));
        }

        return parent::getRepository($className);
    }
1082350
private function classNameFromLegacyNamespace($className)
    {
        $lastUnderscore = strrpos($className, '_');
        if ($lastUnderscore) {
            $className = substr($className, $lastUnderscore + 1);
        }

        return $className;
    }
86955
public function getMetadataFor(string $className) : ClassMetadata
    {
        if (isset($this->loadedMetadata[$className])) {
            return $this->loadedMetadata[$className];
        }

        // Check for namespace alias
        if (strpos($className, ':') !== false) {
            [$namespaceAlias, $simpleClassName] = explode(':', $className, 2);

            $realClassName = $this->getFqcnFromAlias($namespaceAlias, $simpleClassName);
        } else {
            $realClassName = $this->getRealClass($className);
        }

        if (isset($this->loadedMetadata[$realClassName])) {
            // We do not have the alias name in the map, include it
            return $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName];
        }

        $loadingException = null;

        try {
            if ($this->cacheDriver !== null) {
                $cached = $this->cacheDriver->fetch($realClassName . $this->cacheSalt);

                if ($cached instanceof ClassMetadata) {
                    $this->loadedMetadata[$realClassName] = $cached;

                    $this->wakeupReflection($cached, $this->getReflectionService());
                } else {
                    foreach ($this->loadMetadata($realClassName) as $loadedClassName) {
                        $this->cacheDriver->save(
                            $loadedClassName . $this->cacheSalt,
                            $this->loadedMetadata[$loadedClassName]
                        );
                    }
                }
            } else {
                $this->loadMetadata($realClassName);
            }
        } catch (MappingException $loadingException) {
            $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName);

            if ($fallbackMetadataResponse === null) {
                throw $loadingException;
            }

            $this->loadedMetadata[$realClassName] = $fallbackMetadataResponse;
        }

        if ($className !== $realClassName) {
            // We do not have the alias name in the map, include it
            $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName];
        }

        return $this->loadedMetadata[$className];
    }
928307
protected final function fileName(string $className): string
    {
        $fileName = "";
        if (array_key_exists($className, $this->className)) {
            $fileName = $this->className[$className];
            $this->removeClass($className);
        }
        return $fileName;
    }
1332095
public function getDocumentDatabase(string $className) : Database
    {
        $className = $this->classNameResolver->getRealClass($className);

        if (isset($this->documentDatabases[$className])) {
            return $this->documentDatabases[$className];
        }

        $metadata = $this->metadataFactory->getMetadataFor($className);
        assert($metadata instanceof ClassMetadata);

        $db                                  = $metadata->getDatabase();
        $db                                  = $db ?: $this->config->getDefaultDB();
        $db                                  = $db ?: 'doctrine';
        $this->documentDatabases[$className] = $this->client->selectDatabase($db);

        return $this->documentDatabases[$className];
    }
680091
public function getVersionString() {
        if ($this->versionString === null) {
            if (!$this->isConnected())
                $this->connect();
            $this->versionString = mysql_get_server_info($this->hConnection);
        }
        return $this->versionString;
    }
492209
public static function get_by_object_classname($classname) {
		$db = Database::Get();
		$ids = $db->getCol('SELECT id FROM object_text WHERE classname=?', [ $classname ]);
		$object_texts = [];
		foreach ($ids as $id) {
			$object_texts[] = self::get_by_id($id);
		}
		return $object_texts;
	}