getSolidityTypes

@param array $types
@return array
347010
protected function getSolidityTypes($types)
    {
        if (!is_array($types)) {
            throw new InvalidArgumentException('Types must be array');
        }
        $solidityTypes = array_fill(0, count($types), 0);

        foreach ($types as $key => $type) {
            $match = [];

            if (preg_match('/^([a-zA-Z]+)/', $type, $match) === 1) {
                if (isset($this->types[$match[0]])) {
                    $className = $this->types[$match[0]];

                    if (call_user_func([$this->types[$match[0]], 'isType'], $type) === false) {
                        // check dynamic bytes
                        if ($match[0] === 'bytes') {
                            $className = $this->types['dynamicBytes'];
                        } else {
                            throw new InvalidArgumentException('Unsupport solidity parameter type: ' . $type);
                        }
                    }
                    $solidityTypes[$key] = $className;
                }
            }
        }
        return $solidityTypes;
    }
513390
private function doWarm(array $types)
    {
        $warmed = [];
        $this->doClear($types);
        foreach ($types as $type) {
            $this->mf->getMetadataForType($type);
            $warmed[] = $type;
        }
        return $warmed;
    }
504655
public function getTypes()
    {
        $classes = parent::getTypes();

        foreach ($classes as $k => &$definition) {

            if (empty($definition[$k]['properties'])) {
                unset($classes[$k]);
                continue;
            }

            $properties = array_filter(array_map(function ($property) {

                if (!empty($property['validation'])) {


                    foreach ($property['validation'] as &$rule){
                        foreach ($rule as $type => &$item) {

                            if ($type === 'Valid') {
                                continue;
                            } else {
                                if (!is_array($item)){
                                    $item = [];
                                }
                                $item['groups'] = ['xsd_rules'];
                            }

                        }
                        unset($item);
                    }
                    unset($rule);

                    return $property['validation'];
                }


                return null;
            }, $definition[$k]['properties']));

            if (empty($properties)) {
                unset($classes[$k]);
                continue;
            }

            $definition[$k] = [
                'properties' => $properties
            ];
        }

        return $classes;
    }
290438
private function mapType($type)
    {
        $types = [
            Gmagick::IMGTYPE_BILEVEL              => 'BILEVEL',
            Gmagick::IMGTYPE_GRAYSCALE            => 'GRAYSCALE',
            Gmagick::IMGTYPE_GRAYSCALEMATTE       => 'GRAYSCALEMATTE',
            Gmagick::IMGTYPE_PALETTE              => 'PALETTE',
            Gmagick::IMGTYPE_PALETTEMATTE         => 'PALETTEMATTE',
            Gmagick::IMGTYPE_TRUECOLOR            => 'TRUECOLOR',
            Gmagick::IMGTYPE_TRUECOLORMATTE       => 'TRUECOLORMATTE',
            Gmagick::IMGTYPE_COLORSEPARATION      => 'COLORSEPARATION',
            Gmagick::IMGTYPE_COLORSEPARATIONMATTE => 'COLORSEPARATIONMATTE',
            Gmagick::IMGTYPE_OPTIMIZE             => 'OPTIMIZE',
            Gmagick::IMGTYPE_UNDEFINED            => 'UNDEFINED',
        ];

        if (!isset($types[$type])) {
            return $types[Gmagick::IMGTYPE_UNDEFINED];
        }

        return $types[$type];
    }
1290864
public function getTypes() {
    $typesExport = array();
    foreach ($this->types->toArray() as $key => $type) {
      $typesExport[str_replace(':','.',$key)] = $type;
    }
    return $typesExport;
  }
1316652
public static function guessClassFromTypes(array $types)
    {
        if (count($types)) {
            foreach (Resource::CLASSES as $class) {
                $class = "JSKOS\\$class";
                foreach ($class::TYPES as $uri) {
                    if (in_array($uri, $types)) {
                        return $class;
                    }
                }
            }
        }
    }
958050
public function getAllPrivilegesByType($type)
    {
        $this->initialize();
        $privileges = [];
        foreach ($this->roles as $role) {
            $privileges = array_merge($privileges, $role->getPrivilegesByType($type));
        }
        return $privileges;
    }
525441
public function getSortationString( array $types, array $translations = array() )
	{
		$sortation = '';

		foreach( $this->_sortations as $sortitem )
		{
			if( ( $string = $sortitem->toString( $types, $translations ) ) !== '' ) {
				$sortation .= $string;
			}
		}

		return $sortation;
	}
248324
public function getAllProperties($types = self::FULL_HIERARCHY) {
    if ($types & self::WITH_OWN) {
      $properties = clone $this->properties;
    } else {
      $properties = new GObjectCollection(array());
    }
    
    if ($types & self::WITH_PARENTS && $this->getParent() != NULL) {
      // treat duplicates (aka: overriden properties):
      $parentTypes = $types | self::WITH_OWN;
      foreach ($this->getParent()->getAllProperties($parentTypes) as $property) {
        if (!$properties->has($property)) {
          $properties->add($property);
        }
      }
    }
    
    return $properties->toArray();
  }
839930
private function getEnabledItemTypes(array $itemTypes): array
    {
        $allItemTypes = array_flip(
            array_map(
                static function (Configuration $config): string {
                    return $config->getItemName();
                },
                $this->configRegistry->getConfigs()
            )
        );

        if (count($itemTypes) === 0) {
            return $allItemTypes;
        }

        return array_filter(
            $allItemTypes,
            static function (string $itemType) use ($itemTypes): bool {
                return in_array($itemType, $itemTypes, true);
            }
        );
    }
181650
public function setMapTypeIds(array $types)
    {
        $parsed = [];
        foreach ($types as $type) {
            $parsed[] = MapTypeId::getIsValid($type)
                ? new JsExpression($type)
                : $type;
        }

        $this->options['mapTypeIds'] = $parsed;
    }
71016
public function getMessages($types)
    {
        $result = array();

        foreach ($types as $type) {
            $storage = $this->getStorageByMessageType($type);
            if ($storage) {
                $result[] = $storage->getMessages(true);
            }
        }

        return $result;
    }
803475
public static function namesByType(array $types)
    {
        $names = array();

        foreach ($types as $type) {
            $names[] = self::nameByType($type);
        }

        return $names;
    }
112273
public function getTypes()
    {
        return array_reduce(
            $this->_models,
            function ($result, $item) {
                $result[$item['type']] = $item['type'];
                return $result;
            },
            []
        );
    }
179654
public function getServiceNamesByType($type)
    {
        if (!$this->hasServices()) {
            return [];
        }
        $types = [];
        $services = $this->getServices();

        foreach ($services as $name => $service) {
            if ($service['type'] !== $type) {
                continue;
            }
            $types[] = $name;
        }

         return $types;
    }
927116
public function get(string $type): array
    {
        if (isset($this->messages[$type])) {
            $messages = $this->messages[$type];

            // Clear messages
            $this->clear($type);

            return $messages;
        } else {
            return [];
        }
    }
542434
public function getList(array $types = [])
    {
        $this->initialize();

        if (empty($types)) {
            return $this->files;
        }

        $images = in_array('image', $types);
        $docs = in_array('document', $types);
        $other = in_array('other', $types);
        $files = array_filter($this->files, function (FileInterface $file) use ($images, $docs, $other) {
            switch ($file->getType()) {
                case 'image':
                    return $images;
                case 'document':
                    return $docs;
                default:
                    return $other;
            }
        });
        $files = array_values($files); // normalize indexes

        return $files;
    }