Returns class the class definition from a given class name.

@param string $className

@return ClassDefinition

@throws \ReflectionException
778128
public function getInternalClassDefinition($className)
    {
        if (!isset(self::$internalDefinitions[$className])) {
            $reflection = new \ReflectionClass($className);
            self::$internalDefinitions[$className] = ClassDefinition::buildFromReflection($reflection);
        }

        return self::$internalDefinitions[$className];
    }
1234532
private static function getInstance(string $className): string
    {
        $collector = EntityCollector::getCollector();
        if (!isset($collector[$className]['instance'])) {
            return Pool::INSTANCE;
        }

        return $collector[$className]['instance'];
    }
702337
public function setClass($classname) {
		$this->class      = trim($classname, '\\');
		$this->reflection = null;
		
		$this->reset();
		
		return $this;
	}
1046034
public static function getConfigFromDomainClass($className) {
		$definition = ClassHelper::normalizeComponentConfig($className);
		/** @var Domain $domain */
		$domain = Yii::createObject($definition);
		$config = $domain->config();
		return $config;
	}
150919
protected function getRealClass($className)
    {
        if (Version::compare('2.2.0') <= 0) {
            return ClassUtils::getRealClass($className);
        }

        if (substr($className, -5) === 'Proxy') {
            return substr($className, 0, -5);
        }

        return $className;
    }
1352152
public function getDefinition($entryName)
    {
        $definition = new ObjectDefinition($entryName, $this->_className);
        $definition
            ->setMethods($this->_methods)
            ->setProperties($this->_properties)
            ->setScope($this->_scope);
        if ($this->_constructor) {
            $definition->setConstructor($this->_constructor);
        }
        return $definition;
    }
231104
public function getMappingByClassName(string $className) : Mapping
    {
        $className = ltrim($className, '\\');

        return (!empty($this->mappings[$className])) ? $this->mappings[$className] : Mapping::null();
    }
1371822
public function getInstance($className)
    {
        switch ($className) {
            case '\\Zepi\\Api\\AccessControl\\Manager\\TokenManager':
                if ($this->tokenManager === null) {
                    $this->tokenManager = $this->framework->initiateObject($className);
                }
                
                return $this->tokenManager;
            break;
            
            default: 
                return $this->framework->initiateObject($className);
            break;
        }
    }
405715
public static function getClassProfile($classname) {
		if (!is_string($classname) || empty($classname)) {
			throw new \InvalidArgumentException("Argument is not a valid class name");
		}
		
		//check if is already stored
		if (array_key_exists($classname, self::$profiles)) {
			return self::$profiles[$classname];
		}
		
		//validate classname
 		if (!class_exists($classname, true)) {
 			throw new \RuntimeException("Class %s could not be found");
 		}
		
		//build profile and return
		self::$profiles[$classname] = new ClassProfile($classname);
		return self::$profiles[$classname];
	}
1038626
public static function getParentClasses($className) {
        $result = array();
        $class = new \ReflectionClass($className);
        if( false === $class ) {
            return $result;
        }
        do {
            $name = $class->getName();
            $result[] = $name;
            $class = $class->getParentClass();
        } while( false !== $class );
        return $result;
    }
869082
public function loadClassWithAlias($className)
    {
        $originalClassName = $this->getOriginalClassName($className);
        return $originalClassName ? $this->loadOriginalClassAndSetAliases($originalClassName) : $this->loadClass($className);
    }
328410
public function getInstance($className)
    {
        switch ($className) {
            case '\\Zepi\\Api\\Rest\\Helper\\FrontendHelper':
                if ($this->frontendHelper === null) {
                    $this->frontendHelper = $this->framework->initiateObject($className);
                }
            
                return $this->frontendHelper;
            break;

            default: 
                return $this->framework->initiateObject($className);
            break;
        }
    }
1097489
protected function reflectClass($className)
    {
        $class = new ClassReflection($className);
        $this->reflectedClassNames[$className] = time();
        foreach ($class->getTagsValues() as $tag => $values) {
            if (array_search($tag, $this->ignoredTags) === false) {
                $this->taggedClasses[$tag][] = $className;
                $this->classTagsValues[$className][$tag] = $values;
            }
        }
        foreach ($class->getProperties() as $property) {
            $propertyName = $property->getName();
            $this->classPropertyNames[$className][] = $propertyName;
            foreach ($property->getTagsValues() as $tag => $values) {
                if (array_search($tag, $this->ignoredTags) === false) {
                    $this->propertyTagsValues[$className][$propertyName][$tag] = $values;
                }
            }
        }
        foreach ($class->getMethods() as $method) {
            $methodName = $method->getName();
            foreach ($method->getTagsValues() as $tag => $values) {
                if (array_search($tag, $this->ignoredTags) === false) {
                    $this->methodTagsValues[$className][$methodName][$tag] = $values;
                }
            }
            foreach ($method->getParameters() as $parameterPosition => $parameter) {
                $this->methodParameters[$className][$methodName][$parameter->getName()] = $this->convertParameterReflectionToArray($parameter, $parameterPosition, $method);
            }
        }
        ksort($this->reflectedClassNames);
        $this->dataCacheNeedsUpdate = true;
    }
332421
public function getMetadataFor($className)
    {
        if (!isset($this->metadata[$className])) {
            $reflectionClass = ClassUtils::newReflectionClass($className);
            $this->metadata[$className] = $this->getClassMetadata($reflectionClass);
        }

        return $this->metadata[$className];
    }
626313
function fromClass($className)
    {
        if(!isset($this->metas[$className]))
        {
            $this->metas[$className] = $this->findMeta($className, $this);
        }

        return $this->metas[$className];
    }
661872
final protected function getDescription(string $className): ?string
    {
        $class = new \ReflectionClass($className);

        $comment = $class->getDocComment() ?: '';

        // Remove the comment markers
        $comment = preg_replace('~^\s*(/\*\*|\* ?|\*/)~m', '', $comment);

        // Keep everything before the first annotation
        $comment = trim(explode('@', $comment)[0]);

        if (!$comment) {
            $comment = null;
        }

        return $comment;
    }
477887
protected function getClassName($className = null)
    {
        $parts = explode('\\', $className ?: $this->className);

        return $parts[count($parts) - 1];
    }