Gets all the current types.

@return array Associative array from extension to array of data about type
506748
public static function &get_types() {
        // If it was already done in this request, use cache.
        if (self::$cachedtypes) {
            return self::$cachedtypes;
        }

        // Get defaults.
        $mimetypes = self::get_default_types();

        // Get custom file types.
        $custom = self::get_custom_types();

        // Check value is an array.
        if (!is_array($custom)) {
            debugging('Invalid $CFG->customfiletypes (not array)', DEBUG_DEVELOPER);
            $custom = array();
        }

        foreach ($custom as $customentry) {
            // Each entry is a stdClass object similar to the array values above.
            if (empty($customentry->extension)) {
                debugging('Invalid $CFG->customfiletypes entry (extension field required)',
                        DEBUG_DEVELOPER);
                continue;
            }

            // To delete a standard entry, set 'deleted' to true.
            if (!empty($customentry->deleted)) {
                unset($mimetypes[$customentry->extension]);
                continue;
            }

            // Check required fields.
            if (empty($customentry->type) || empty($customentry->icon)) {
                debugging('Invalid $CFG->customfiletypes entry ' . $customentry->extension .
                        ' (type and icon fields required)', DEBUG_DEVELOPER);
                continue;
            }

            // Build result array.
            $result = array('type' => $customentry->type, 'icon' => $customentry->icon);
            if (!empty($customentry->groups)) {
                if (!is_array($customentry->groups)) {
                    debugging('Invalid $CFG->customfiletypes entry ' . $customentry->extension .
                            ' (groups field not array)', DEBUG_DEVELOPER);
                    continue;
                }
                $result['groups'] = $customentry->groups;
            }
            if (!empty($customentry->string)) {
                if (!is_string($customentry->string)) {
                    debugging('Invalid $CFG->customfiletypes entry ' . $customentry->extension .
                            ' (string field not string)', DEBUG_DEVELOPER);
                    continue;
                }
                $result['string'] = $customentry->string;
            }
            if (!empty($customentry->defaulticon)) {
                if (!is_bool($customentry->defaulticon)) {
                    debugging('Invalid $CFG->customfiletypes entry ' . $customentry->extension .
                            ' (defaulticon field not bool)', DEBUG_DEVELOPER);
                    continue;
                }
                $result['defaulticon'] = $customentry->defaulticon;
            }
            if (!empty($customentry->customdescription)) {
                if (!is_string($customentry->customdescription)) {
                    debugging('Invalid $CFG->customfiletypes entry ' . $customentry->extension .
                            ' (customdescription field not string)', DEBUG_DEVELOPER);
                    continue;
                }
                // As the name suggests, this field is used only for custom entries.
                $result['customdescription'] = $customentry->customdescription;
            }

            // Track whether it is a custom filetype or a modified existing
            // filetype.
            if (array_key_exists($customentry->extension, $mimetypes)) {
                $result['modified'] = true;
            } else {
                $result['custom'] = true;
            }

            // Add result array to list.
            $mimetypes[$customentry->extension] = $result;
        }

        self::$cachedtypes = $mimetypes;
        return self::$cachedtypes;
    }
937661
public function getTypes()
    {
        if (!array_key_exists('value', $this->types)) {
            return;
        }

        //return an array, no matter one or many types defined
        if (is_array($this->types['value']) && count($this->types['value']) > 1) {
            return $this->types['value'];
        } else {
            return [$this->types['value']];
        }
    }
1225923
public function types()
    {
        if (is_null($this->typeRequests)) {
            $this->typeRequests = new TypeRequests($this->client);
        }

        return $this->typeRequests;
    }
42042
public function getTypes() {
    // If type hint is set then that is the type of the parameter.
    if ($this->typeHint) {
      if ($this->typeHint instanceof TokenNode) {
        if ($this->typeHint->getType() === T_ARRAY) {
          $docTypes = $this->getDocTypes();
          foreach ($docTypes as $docType) {
            if ($docType !== 'array' && substr($docType, -2) !== '[]') {
              return [$this->typeHint->getText()];
            }
          }
          return $docTypes;
        }
        else {
          return [$this->typeHint->getText()];
        }
      }
      else {
        return [$this->typeHint->getAbsolutePath()];
      }
    }
    return $this->getDocTypes();
  }
168018
public function fetchTypes() {
        $response = $this->client->request('GET', 'https://crest-tq.eveonline.com/market/types/');

        return iterator_to_array($this->getOtherPages(json_decode($response->getBody()->getContents())));
    }
1033415
public function getAll()
    {
        $result = $this->wsClient->invokeOperation('listtypes', [ ], 'GET');
        $modules = $result[ 'types' ];

        $result = array();
        foreach ($modules as $moduleName) {
            $result[ $moduleName ] = [ 'name' => $moduleName ];
        }
        return $result;
    }
971263
public function getTypes()
    {
        $types = array();

        $typeStrings = $this->soapClient->__getTypes();
        foreach ($typeStrings as $typeString) {
            $type = new TypeNode($typeString);
            $element = $this->findTypeElement($type->getName());
            if (!empty($element)) {
                $type->setElement($this->document, $element);
            }

            $types[] = $type;
        }

        return $types;
    }
292118
public function getTypes() {
		$types = $this->find()
			->select(['type'])
			->distinct('type')
			->order('type ASC')
			->disableHydration()
			->toArray();

		return Hash::combine($types, '{n}.type', '{n}.type');
	}
439102
public function toArray()
    {
        $type = $this->getType();
        $array = array(
            'type' => $type,
        );
        if ('function' == $type) {
            $array['function'] = $this->getFunction();
        } else {
            $array['class']  = $this->getClass();
            $array['method'] = $this->getMethod();
        }
        return $array;
    }
360842
public function getResourceTypes()
    {
        $types = [];
        foreach ($this as $entity) {
            $types[] = $entity->getType();
        }
        return array_unique($types);
    }
969222
public static function getAvailableTypes()
    {
        return [
            self::TYPE_STRING,
            self::TYPE_INTEGER,
            self::TYPE_FLOAT,
            self::TYPE_BOOLEAN,
            self::TYPE_DATETIME,
        ];
    }
548799
public static final function values() {
			if (!static::isDone())
				static::autoload();

			$key = get_called_class();

			if (array_key_exists($key, self::$types))
				return self::$types[$key];

			return array();
		}
91471
public function current() : array
    {
        return $this->result->fetch(\PDO::FETCH_ASSOC, \PDO::FETCH_ORI_ABS, $this->pointer);
    }
1172265
public function current()
    {
        $part  = substr($this->string, ($this->index * $this->count), $this->count);
        $chars = array_pad(str_split($part), $this->count, 0);

        return [
            'r' => $chars[0],
            'g' => $chars[1],
            'b' => $chars[2],
        ];
    }
1270179
public function getClasses()
    {
        $classes = [];
        $current = $this->head;
        while ($current && $current->value) {
            $classes[] = $current->value;
            $current = $current->next;
        }

        return array_filter($classes);
    }
768623
private function getType(): array
    {
        if (!$this->type || $this->is('customize_preview')) {
            $this->type = parent::type();
        }

        return $this->type;
    }
357226
public function getTypes()
    {
        $types = $this->config()->get('types');
        $i18nTypes = [];
        $allowedTypes = $this->config()->get('allowed_types');

        if ($this->allowed_types_override) {
            // Prioritise local field over global settings
            $allowedTypes = $this->allowed_types_override;
        }

        if ($allowedTypes) {
            foreach ($allowedTypes as $type) {
                if (!array_key_exists($type, $types)) {
                    user_error("{$type} is not a valid link type");
                }
            }

            foreach (array_diff_key($types, array_flip($allowedTypes)) as $key => $value) {
                unset($types[$key]);
            }
        }

        // Get translatable labels
        foreach ($types as $key => $label) {
            $i18nTypes[$key] = _t('Linkable.TYPE' . strtoupper($key), $label);
        }

        return $i18nTypes;
    }