@param string $class
@param bool $aggregated

@return array
778182
public function databaseIndexes($class, $aggregated = true)
    {
        $class = ClassInfo::class_name($class);
        if ($class === DataObject::class) {
            return [];
        }
        $this->cacheDatabaseIndexes($class);
        $indexes = $this->databaseIndexes[$class];
        if (!$aggregated) {
            return $indexes;
        }
        return array_merge($indexes, $this->databaseIndexes(get_parent_class($class)));
    }
902579
public function make($class, array $params = null)
    {
        if ($class == 'array') {
            return [];
        }

        $reflected = $this->reflect($class);

        if (empty($reflected->getConstructor())) {

            if ($reflected->isInterface()) {

                if ($match = $this->findMatchInParams($reflected, $params)) {
                    return $this->make($match->getName());
                }

                throw new IocNotResolvableException(
                    'Cannot instantiate ' . $reflected->getName()
                );
            }

            return $reflected->newInstance();
        }

        $dependencies = $this->getDependencies($reflected);

        $instanceArgs = $this->resolveDependencies($dependencies, $params);

        $instanceArgs = $this->setArgsValues($params, $instanceArgs);

        if (count($dependencies) != count($instanceArgs)) {
            throw new UnresolvedDependenciesException(
                'Could not resolve all dependencies', [
                'Required' => $dependencies,
                'Resolved' => $instanceArgs
            ]);
        }
        $instanceArgs = $this->mergeArgsAndParams($instanceArgs, $params);

        return $reflected->newInstanceArgs($instanceArgs);
    }
165499
protected static function _generateAbstractMethods($class)
    {
        $result = [];
        if (!class_exists($class)) {
            throw new MissingImplementationException("Unexisting parent class `{$class}`");
        }
        $reflection = Inspector::inspect($class);
        $methods = $reflection->getMethods(ReflectionMethod::IS_ABSTRACT);
        foreach ($methods as $method) {
            $result[$method->getName()] = static::_generateMethod($method);
        }
        return $result;
    }
440786
protected static function get_arguments($class)
    {
        if (isset(self::$arguments[$class])) {
            return self::$arguments[$class];
        } else {
            if ($staticFields = Config::inst()->get($class, 'translatable_fields', Config::FIRST_SET)) {
                if (is_array($staticFields) && !empty($staticFields)) {
                    return $staticFields;
                }
            }
        }

        return null;
    }
916214
private function getEntityTypeInfo($class)
    {
        $entityType = $this->getEntityType($class);

        if (!$entityType) {
            return [null, null];
        }

        $info = entity_get_info($entityType);

        if (!$info) {
            return [null, null];
        }

        return [$entityType, $info];
    }
414550
public function fetchAllObj(string $class = null): array
    {
        if (!$this->wasExecuted()) {
            $this->exec();
        }

        if ($class === null) {
            return $this->getAdapter()->getStatement()->fetchAll(PDO::FETCH_OBJ);
        } else {
            $objects = [];
            foreach ($this->fetchAll() as $record) {
                $objects[] = new $class($record);
            }

            return $objects;
        }
    }
331675
public function getMetadataFor($class)
    {
        if (isset($this->metadata[$class])) {
            
            $identity = new ObjectIdentity(sprintf('%s@%s', Metadata::class, $class));
            if (!$this->getClassManager()->hasShared($identity->getIdentifier())) {
                /**
                 * @var MetadataInterface $metadata
                 */
                $metadata = $this->getClassManager()->createInstanceFor(Metadata::class, ...[$this->metadata[$class]]);
                $dispatcher = $this->getServiceLocator()->getDispatcher();
                
                $dispatcher->dispatch(ORMEvents::onMetadataLoad, new MetadataLoadEvent($metadata));
                
                $this->getClassManager()->setShared($identity->getIdentifier(), $metadata);
            }
            
            return $this->getClassManager()->getShared($identity->getIdentifier());
        }
        
        throw new NotFoundException('Metadata for ":class" not found', ['class' => $class]);
    }
821395
private function supports($class)
    {
        $class = new \ReflectionClass($class);
        $methods = $class->getMethods(\ReflectionMethod::IS_PUBLIC);
        foreach ($methods as $method) {
            if ($this->isGetMethod($method)) {
                return true;
            }
        }

        return false;
    }
146636
public function getRestrictions($hasAccess, string $class): array
    {
        $restrictions = [];
        $oneOfPoliciesHasNoLimitation = false;

        foreach ($this->flattenArrayOfLimitationsForCurrentUser($hasAccess) as $policy => $limitations) {
            $policyHasLimitation = false;
            foreach ($limitations as $limitation) {
                if ($limitation instanceof $class) {
                    $restrictions[] = $limitation->limitationValues;
                    $policyHasLimitation = true;
                }
            }
            if (false === $policyHasLimitation) {
                $oneOfPoliciesHasNoLimitation = true;
            }
        }

        if ($oneOfPoliciesHasNoLimitation) {
            return [];
        }

        return empty($restrictions) ? $restrictions : array_unique(array_merge(...$restrictions));
    }
888280
private function getFromAnnotation(ReflectionClass $class): array
    {
        $sortings = Utils::getRecursiveClassAnnotations($this->getAnnotationReader(), $class, Sorting::class);

        $result = [];
        foreach ($sortings as $classWithAnnotation => $sorting) {
            foreach ($sorting->classes as $className) {
                $this->throwIfInvalidAnnotation($classWithAnnotation, 'Sorting', SortingInterface::class, $className);

                $name = lcfirst(preg_replace('~Type$~', '', Utils::getTypeName($className)));
                $result[$name] = new $className();
            }
        }

        return $result;
    }
80880
private static function methodsOf(\ReflectionClass $class): \Iterator
    {
        return new \CallbackFilterIterator(
                new \ArrayIterator($class->getMethods()),
                function(\ReflectionMethod $method)
                {
                    return !$method->isPrivate()
                            && !$method->isFinal()
                            && !$method->isStatic()
                            && !$method->isConstructor()
                            && !$method->isDestructor();
                }
        );
    }
46377
protected function getColumnFromSubQuery($class, $phpName, $failSilently = true)
    {
        $subQueryCriteria = $this->getSelectQuery($class);
        $tableMap = $subQueryCriteria->getTableMap();
        if ($tableMap->hasColumnByPhpName($phpName)) {
            $column = $tableMap->getColumnByPhpName($phpName);
            $realColumnName = $class.'.'.$column->getName();

            return [$column, $realColumnName];
        } elseif (isset($subQueryCriteria->asColumns[$phpName])) {
            // aliased column
            return [null, $class.'.'.$phpName];
        } elseif ($failSilently) {
            return [null, null];
        } else {
            throw new PropelException(sprintf('Unknown column "%s" in the subQuery with alias "%s".', $phpName, $class));
        }
    }
228743
public function executeHandler(CommandInterface $command, AggregateInterface $aggregate): AggregateInterface
    {
        /* Execute method is implemented in final class */
        return $this->execute($command, $aggregate);
    }
1129745
protected function getClassMetadata(string $class): ClassMetadata
    {
        $factory = $this->getDoctrineHelper()->getMetadataFactory();
        if (!$factory->hasMetadataFor($class)) {
            throw new \InvalidArgumentException(sprintf('No metadata found for class "%s"', $class));
        }
        
        return $factory->getMetadataFor($class);
    }
677317
public static function getClassAndAlias($class)
    {
        if (false !== strpos($class, ' ')) {
            list($class, $alias) = explode(' ', $class);
        } else {
            $alias = null;
        }
        if (0 === strpos($class, '\\')) {
            $class = substr($class, 1);
        }

        return [$class, $alias];
    }
315867
public function getActiveRecordObjects($class, $orderBy=NULL, $descOrder=FALSE) {

		if (!class_exists($class) or !is_subclass_of($class, 'Pair\ActiveRecord')) {
			return array();
		}
		
		// sets pagination count
		$this->db->setQuery('SELECT COUNT(*) FROM `' . $class::TABLE_NAME . '`');
		$this->pagination->count = $this->db->loadCount();
	
		$orderDir = $descOrder ? 'DESC' : 'ASC';
		
		$query =
			'SELECT *' .
			' FROM `' . $class::TABLE_NAME . '`' .
			($orderBy ? ' ORDER BY `' . $orderBy . '` ' . $orderDir : NULL) .
			' LIMIT ' . $this->pagination->start . ', ' . $this->pagination->limit;
	
		$this->db->setQuery($query);
		$list = $this->db->loadObjectList();
	
		$objects = array();
	
		foreach ($list as $item) {
			$objects[] = new $class($item);
		}

		return $objects;
	
	}
375008
public function database_extensions($class)
    {
        $extensions = Config::inst()->get($class, 'database_extensions', Config::UNINHERITED);
        if ($extensions) {
            return $extensions;
        } else {
            return false;
        }
    }