Returns the list of parent service classes for the specified class.

@param  string $className
@return array
428440
protected function getParentClasses($className)
    {
        $parents = array();

        foreach (array_reverse(class_parents($className)) as $class) {
            if ($this->driver->isService($class)) {
                $parents[] = $class;
            }
        }

        return $parents;
    }
383001
private function getPortableElementSubclasses($superClassName){
        $subClasses = [];
        foreach(PortableModelRegistry::getRegistry()->getModels() as $model){
            $portableElementClass = $model->getQtiElementClassName();
            if(is_subclass_of($portableElementClass, $superClassName)){
                $subClasses[] = $portableElementClass;
            }
        }
        return $subClasses;
    }
675584
public static function getParent($className) {
		$reflection = ClassType::from($className);
		$parent = $reflection->getParentClass();
		return $parent ? $parent->getName() : $parent;
	}
697026
public function getResultsAsObjects($classname)
    {
        $new = array();
        foreach ((array) $this->results as $result) {
            if (is_array($result))
                $new[] = new $classname($result);
            else
                $new[] = $result;
        }
        return $new;
    }
91123
public function findByClass($className)
    {
        $result = [];
        foreach ($this->_traits as $trait) {
            if ($trait->matchClassName($className)) {
                $result[] = $trait;
            }
        }
        $result = SortUtils::sortReflections($result);

        return $result;
    }
1076873
public function getByClassname(string $classname)
    {
        foreach ($this->container as $value) {
            if (is_object($value) && $value instanceof $classname) {
                return $value;
            }
        }

        return null;
    }
478735
public function getByClass($className)
    {
        $types = array_unique(Arr::wrap(Arr::get($this->classMapping, $className, [])));
        $resolved = array_map([$this, 'get'], $types);

        return $this->firstOrAll(Arr::collapse($resolved));
    }
74759
public function fetchAllClass(string $classname) : array
    {
        $this->stmt->setFetchMode(\PDO::FETCH_CLASS, $classname);
        return $this->stmt->fetchAll();
    }
70878
public static function getMappedClassName($className)
    {
        $mappedName = array_search($className, self::$classMap);

        if ($mappedName) {
            return $mappedName;
        }

        $mappedName = array_search($className, array_flip(self::$classMap));

        if ($mappedName) {
            return $mappedName;
        }

        return false;
    }
95893
public static function getClassAnnotations($className)
    {
        if (!isset(self::$annotationCache[$className])) {
            $class = new \ReflectionClass($className);
            self::$annotationCache[$className] = self::parseAnnotations($class->getDocComment());
        }

        return self::$annotationCache[$className];
    }
364623
public static function getProvider($classname) {
		if (array_key_exists($classname, self::$providers)) {
			return self::$providers[$classname];
		}
		
		$provider = new $classname;
		
		if (!($provider instanceof ServiceProviderInterface)) {
			throw new \InvalidArgumentException("$classname is not a valid ServiceProviderInterface instance");
		}

		self::$providers[$classname] = $provider;
		return self::$providers[$classname];
	}
437912
static public function getParents($className)
    {
        $parents = [];
        $parent = new \ReflectionClass($className);
        while (true) {
            $parent = $parent->getParentClass();
            if (!$parent) {
                break;
            } else {
                $parents[] = $parent->getName();
            }
        }
        return $parents;
    }
1319500
public static function getShortClassname($classname)
    {
        if (is_array($classname)) {
            return  array_map(['BackBee\ClassContent\AbstractContent', 'getShortClassname'], $classname);
        }

        if (in_array($classname, ['scalar', 'array'])) {
            return $classname;
        }

        $isExcluded = self::isExcludedClassname($classname);

        try {
            if (!is_subclass_of($classname, 'BackBee\ClassContent\AbstractClassContent')) {
                throw new ClassNotFoundException();
            }
        } catch (ClassNotFoundException $ex) {
            return self::onUnknownClassname(
                sprintf('Given classname %s is not a subclass of AbstractClassContent.', $classname),
                $ex
            );
        }

        return ($isExcluded ? '!' : '').str_replace(self::CLASSCONTENT_BASE_NAMESPACE, '', $classname);
    }
43701
private static function getClassConstants(string $className): array
    {
        return self::$constantCache[$className]
            ?? self::$constantCache[$className] = (new \ReflectionClass($className))->getConstants();
    }
334618
public function getFieldAliases($className) {
        $fieldAliases= array ();
        if ($className= $this->loadClass($className)) {
            if ($ancestry= $this->getAncestry($className)) {
                for ($i= count($ancestry) - 1; $i >= 0; $i--) {
                    if (isset ($this->map[$ancestry[$i]]['fieldAliases'])) {
                        $fieldAliases= array_merge($fieldAliases, $this->map[$ancestry[$i]]['fieldAliases']);
                    }
                }
            }
            if ($this->getInherit($className) === 'single') {
                $descendants= $this->getDescendants($className);
                if ($descendants) {
                    foreach ($descendants as $descendant) {
                        $descendantClass= $this->loadClass($descendant);
                        if ($descendantClass && isset($this->map[$descendantClass]['fieldAliases'])) {
                            $fieldAliases= array_merge($fieldAliases, array_diff_key($this->map[$descendantClass]['fieldAliases'], $fieldAliases));
                        }
                    }
                }
            }
        }
        return $fieldAliases;
    }
275961
public function getAll($className)
    {
        $collections = array();
        foreach ($this->cursorClassName as $key => $cursor) {
            if ($cursor === $className) {
                $collections[] = $this->collections[$key];
            }
        }

        return $collections;
    }
112987
public function getSearchableFieldsFor($className) {
		$sng = null;
		if (is_object($className)) {
			$sng = $className;
			$className = get_class($className);
		}
		
		if (!class_exists($className)) {
			return array();
		}

		$searchable = $this->buildSearchableFieldCache();
		$hierarchy = array_reverse(ClassInfo::ancestry($className));
		
		$fieldsToSearch = null;

		foreach ($hierarchy as $class) {
			if (isset($searchable[$class])) {
				$fieldsToSearch = $searchable[$class];
			}
		}

		if (!$sng) {
			$sng = singleton($className);
		}

		if (!$fieldsToSearch) {
			if($sng->hasMethod('getSolrSearchableFields')) {
				$fieldsToSearch = $sng->getSolrSearchableFields();
			} else {
				$fieldsToSearch = $sng->searchableFields();
			}
		}
		
		$sng->extend('updateSolrSearchableFields', $fieldsToSearch);
		return $fieldsToSearch;
	}