Get "default" database indexable field types

@param  string $class

@return array
187726
protected function cacheDefaultDatabaseIndexes($class)
    {
        if (array_key_exists($class, $this->defaultDatabaseIndexes)) {
            return $this->defaultDatabaseIndexes[$class];
        }
        $this->defaultDatabaseIndexes[$class] = [];

        $fieldSpecs = $this->fieldSpecs($class, self::UNINHERITED);
        foreach ($fieldSpecs as $field => $spec) {
            /** @var DBField $fieldObj */
            $fieldObj = Injector::inst()->create($spec, $field);
            if ($indexSpecs = $fieldObj->getIndexSpecs()) {
                $this->defaultDatabaseIndexes[$class][$field] = $indexSpecs;
            }
        }
        return $this->defaultDatabaseIndexes[$class];
    }
532087
private function getPropertyMap($class)
    {
        $output['meta'] = $meta = $this->em->getClassMetadata($class);
        $output['fields']       = $meta->getFieldNames();
        $output['associations'] = $meta->getAssociationNames();

        $output['fields'] = array_filter(
            $output['fields'],
            function($fieldName) use ($output) {
                if (in_array($fieldName, $output['associations'])) {
                    return false;
                } else {
                    return true;
                }
            }
        );

        return $output;
    }
682075
public function dsql($class = null)
    {
        $class = $class ?: $this->dsql_class;
        $obj = $this->add($class);
        if (!$obj instanceof DB_dsql) {
            throw $this->exception('Specified class must be descendant of DB_dsql')
                ->addMoreInfo('class', $class);
        }

        return $obj;
    }
213695
public function getEditableFieldsWithValues($class, $params = array())
    {
        $array = array_intersect_key(
            get_object_vars($this),
            array_flip(call_user_func($class.'::getEditableFields', $params))
        );
        return array_filter($array, array($this, 'isNotNullOrEmpty'));
    }
311891
public static function get_localized_class_fields($class)
    {
        $fieldNames = null;
        $ancestry = array_reverse(ClassInfo::ancestry($class));
        foreach ($ancestry as $className) {
            if (isset(self::$localizedFields[$className])) {
                if ($fieldNames === null) {
                    $fieldNames = array();
                }
                foreach (self::$localizedFields[$className] as $k => $v) {
                    $fieldNames[] = $k;
                }
            }
        }
        return array_unique($fieldNames);
    }
927032
public function getByType($class)
    {
        $class = array_map('strtolower', (array)$class);

        $out = array_filter($this->_items, function ($assoc) use ($class) {
            list(, $name) = namespaceSplit(get_class($assoc));

            return in_array(strtolower($name), $class, true);
        });

        return array_values($out);
    }
1222792
public static function getRealType($class) {
        $callback = function () use ($class) {
            $instance = new \ReflectionClass($class);
            $doc = $instance->getDocComment();
            unset($instance);
            preg_match_all('/\@property\s+([a-z]+)\s+\$([a-z\d_]+)/i', $doc, $matches, PREG_SET_ORDER);
            return array_column($matches, 1, 2);
        };
        if (app()->isDebug()) {
            return $callback();
        }
        return cache()->getOrSet('class_doc_type:'.$class, $callback, 86400);
    }
227122
public static function get_extra_config($class)
    {
        $config = Config::inst();
        $classConfig = $config->get($class, null, Config::EXCLUDE_EXTRA_SOURCES);
        $extensionConfig = $config->get(static::class);
        $extraConfig = [];

        foreach (static::CONFIG_SETTINGS_WITH_DEFAULTS as $setting) {
            if (isset($classConfig[$setting]) && !is_array($extensionConfig[$setting])) {
                $extraConfig[$setting] = $classConfig[$setting];
            } else {
                $extraConfig[$setting] = $extensionConfig[$setting];
            }
        }

        return $extraConfig;
    }
1038970
public static function getByClass( $class )
	{
		$results = [];
		foreach ( static::$globals as $k => $v )
			if ( $v instanceof $class )
				$results[$k] = $v;
		return $results;
	}
1113439
private function getClassInfo($defClass) {
		if (is_object($defClass)) {
			if ($defClass instanceof ReflectionClass) {
				$className = $defClass->getName();
				$refClass = $defClass;
			} else {
				$className = get_class($defClass);
				$refClass = new ReflectionClass($className);
			}
		} else {
			$className = $defClass;
			$refClass = new ReflectionClass($className);
		}

		return [ $className, $refClass ];
	}
1021202
protected static function getDefaultFields()
    {
        //
        $attribute = 'DefaultFields';

        // retrieve value from class setting definition
        if (!static::hasClassAttribute($attribute)) {
            $fields = [];

            //
            $schema = static::getSchema();

            //
            foreach ($schema as $field => $aspects) {
                if (isset($aspects['Class']) && $aspects['Relation'] == '1:1') {
                    $class = $aspects['Class'];
                    $fields[$field] = call_user_func($class.'::join', $field);
                } else {
                    $fields[] = $field;
                }
            }

            // store as setting for future request
            static::setClassAttribute($attribute, $fields);
        }

        // return primary key field name
        return static::getClassAttribute($attribute);
    }
1131758
public static function getAllClassTraits($class)
    {
        $results = [];

        foreach (array_merge([$class => $class], class_parents($class)) as $class) {
            $results += self::getAllTraits($class);
        }

        return array_unique($results);
    }
435094
protected function extractDtoProperties($class)
    {
        $properties = [];
        $reflector = new \ReflectionClass($class);
        if ($reflector->isSubclassOf(self::DTO_INTERFACE)) {
            $properties = array_merge($properties, InjectorHelper::extractVariables($reflector));
        }

        return $properties;
    }
422888
public function getDescendantsOf($class)
    {
        if (is_object($class)) {
            $class = get_class($class);
        }

        $lClass = strtolower($class);
        if (array_key_exists($lClass, $this->descendants)) {
            return $this->descendants[$lClass];
        }

        return [];
    }
1244260
public static function getClassAnnotations($class)
    {
        $annotationBag = Bridge\Loader::getInstance()->getClassAnnotations($class);
        $annotationBag = self::explodeNamespaces($annotationBag);

        return new ConfigObject($annotationBag);
    }
892573
public function getImplements($class)
    {
        $interfaces = [];
        $classId = $this->getClassId($class);
        if (isset($classId)) {
            if (isset($this->implements[$classId])) {
                foreach ($this->implements[$classId] as $interfaceId) {
                    $interfaces[$this->interfaces[$interfaceId]] = 1;
                }
            }
            foreach ($this->getAncestors($class) as $parent) {
                foreach ($this->getImplements($parent) as $interface) {
                    $interfaces[$interface] = 1;
                }
            }
        }
        return array_keys($interfaces);
    }
179723
private function getClassProperties($class)
    {
        $properties = $this->getCache()->get('_PHX.serialze_properties.'. $class);
        if (!isset($properties)) {
            $classResolver = $this->getClassResolver();
            $properties = $this->getReflectionProperties($class);
            foreach ($this->getAnnotations()->get($class) as $annotation) {
                if ($annotation instanceof IsA) {
                    $properties[$this->getAnnotationProperty($annotation)]['type']
                        = $classResolver->resolve($annotation->class, $annotation->getDeclaringClass());
                } elseif ($annotation instanceof IsArray && is_scalar($annotation->element)) {
                    $name = $this->getAnnotationProperty($annotation);
                    $properties[$name]['type'] = 'array';
                    $properties[$name]['element']
                        = $classResolver->resolve($annotation->element, $annotation->getDeclaringClass());
                } elseif ($annotation instanceof SerializeName) {
                    $properties[$this->getAnnotationProperty($annotation)]['serializeName']
                        = $annotation->value;
                }
            }
            $this->getCache()->save('_PHX.serialze_properties.'.$class, $properties);
        }
        return $properties;
    }