@param array $types

@return Reference[]
969741
protected function getAdminExtensionReferenceByTypes(array $types)
    {
        $references = [];
        foreach ($types as $type) {
            $references[$type] = new Reference('sonata_translation.admin.extension.'.$type.'_translatable');
        }

        return $references;
    }
1348854
public function get($types)
    {
        $ret = [];

        if (!$types) {
            return $ret;
        }

        if (!is_array($types)) {
            $types = [];
        }

        foreach ($types as $type) {
            if (isset($this->instances[$type])) {
                $ret = array_merge($ret, $this->instances[$type]);
            }
        }

        return $ret;
    }
274119
protected function getValidators( $types )
    {
        $validators = array();

        if ( 'image/*' == $types )
        {
            $validators[] = array(
                'name' => 'Zend\Validator\File\IsImage',
            );
        }
        else if ( ! empty( $types ) && '*' !== $types && '*/*' !== $types )
        {
            $validators[] = array(
                'name'      => 'Zend\Validator\File\MimeType',
                'options'   => array(
                    'mimeType' => $types
                ),
            );
        }

        return $validators;
    }
1082038
public function fromArray( $types )
	{
		$this->types			=& $types['types'];
		$this->attributes		=& $types['attributes'];
		$this->attributeGroups	=& $types['attributeGroups'];
		$this->elements			=& $types['elements'];
		$this->processedSchemas	=& $types['processedSchemas'];
		if ( isset( $types['typeIds'] ) )
		{
			$this->typeIds		=& $types['typeIds'];
		}

		// Prevent re-loading base types
		$this->baseTypesLoaded = true;

		return true;
	}
875917
public function getFlagsOfType($type)
    {
        if ($this->flags === null) {
            return [];
        }

        $matches = [];

        foreach ($this->flags as $flag) {
            if ($flag->type == $type) {
                $matches []= $flag;
            }
        }

        return $matches;
    }
304677
private function resolveTypes($type)
    {
        $sortTypes = [];

        do {
            $sortTypes[] = $sortType = $this->sortRegistry[$type];
        } while (($type = $sortType->getParent()) !== null);

        return $sortTypes;
    }
614613
private function resolveTypes($type)
    {
        $batchTypes = [];

        do {
            $batchTypes[] = $batchType = $this->batchRegistry[$type];
        } while (($type = $batchType->getParent()) !== null);

        return $batchTypes;
    }
909757
public function setReferenceTypes(array $referenceTypes)
    {
        $this->referenceTypes = [];
        foreach ($referenceTypes as $referenceType) {
            $this->addReferenceType($referenceType);
        }

        return $this;
    }
139027
public function get_unknown_file_types($types) {
        $unknown = [];

        foreach ($this->normalize_file_types($types) as $type) {
            if ($type === '*') {
                // Any file is considered as a known type.
                continue;
            } else if ($type === '.xxx') {
                $unknown[$type] = true;
            } else if ($this->is_filetype_group($type)) {
                // The type is a group that exists.
                continue;
            } else if ($this->looks_like_mimetype($type)) {
                // If there's no extension associated with that mimetype, we consider it unknown.
                if (empty(file_get_typegroup('extension', [$type]))) {
                    $unknown[$type] = true;
                }
            } else {
                $coretypes = core_filetypes::get_types();
                $typecleaned = str_replace(".", "", $type);
                if (empty($coretypes[$typecleaned])) {
                    // If there's no extension, it doesn't exist.
                    $unknown[$type] = true;
                }
            }
        }

        return array_keys($unknown);
    }
1170154
public function argTypes($types) {
		is_array($types) ? $this->argumentTypes = $types : $this->argumentTypes = func_get_args();
		return $this;
	}
390054
public static function getValidTypes($type)
    {
        if (MailTypes::TYPE_PRINT === $type) {
            return [MailTypes::TYPE_ALL, MailTypes::TYPE_PRINT];
        }
        if (MailTypes::TYPE_SCREEN === $type) {
            return [MailTypes::TYPE_ALL, MailTypes::TYPE_SCREEN];
        }

        return [MailTypes::TYPE_ALL, MailTypes::TYPE_PRINT, MailTypes::TYPE_SCREEN];
    }
1211879
protected function findNextMessages($types)
    {
        return $this->messageManager->findByAttempts(
            $this->types,
            MessageInterface::STATE_ERROR,
            $this->batchSize,
            $this->maxAttempts,
            $this->attemptDelay
        );
    }
797679
public static function getFilter(string $type): array
    {
        return isset(self::$filters[$type]) ? self::$filters[$type] : [];
    }
1174150
public function getChecksByType(string $type): array
    {
        return isset($this->checks[$type]) ? $this->checks[$type] : array();
    }
1170589
public function withTypes(array $types)
    {
        $choices = [
            PlatformInterface::TYPE_MOBILE,
            PlatformInterface::TYPE_TV,
            PlatformInterface::TYPE_WEB,
        ];

        Assertion::allChoice($types, $choices);
        Assertion::same($types, \array_unique($types));

        $instance = clone $this;

        $instance->types = $types;

        return $instance;
    }
15059
protected function removeImpossibleArraySubtypes(array $types): array
    {
        $subTypes = $this->getSubTypes();

        if (count($subTypes) === 0) {
            return $types;
        }

        $subHandler = $this->setTypes($subTypes);

        foreach ($this->value as $item) {
            $subHandler = $subHandler->setTypes($subHandler->getPossibleTypes($item));
        }

        $possibleSubTypes = $subHandler->types;

        return count($possibleSubTypes) === count($subTypes)
            ? $types
            : array_filter($types, function($type) use ($possibleSubTypes) {
                return substr($type, -2) !== '[]' || in_array(substr($type, 0, -2), $possibleSubTypes);
            });
    }
1230764
public static function getOperators($type)
    {
        if (!in_array($type, self::getTypes())) {
            return [];
        }

        $source = snake_case($type).'_operators';

        return self::$$source;
    }