@param string $type

@return array
178006
public function findComponentsByType($type)
    {
        $components = [];
        foreach ($this->components as $component) {
            if ($component->hasType($type)) {
                $components[] = $component;
            }
        }

        return $components;
    }
1300596
public function get(string $type): array
    {
        try {
            return $this->converters[$this->resolveType($type)];
        } catch (\Throwable $t) {
            throw new InvalidTypeConverterException(
                sprintf('Invalid converter type `%s`.', $type)
            );
        }
    }
551729
public function getTypeOperations( string $type ): array {
		return array_intersect_key(
			$this->getArrayCopy(),
			array_flip( $this->typePointers[$type] )
		);
	}
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];
    }
1202323
public static function getTypeName($type = null)
    {
        $result = [
            Item::TYPE_PERMISSION => 'Permission',
            Item::TYPE_ROLE => 'Role',
        ];
        if ($type === null) {
            return $result;
        }

        return $result[$type];
    }
968314
public function gatherElementsFromType( $type )
	{
		if ( is_string( $type ) )
		{
			$type = $this->getType( $type );
		}

		if ( ! is_array( $type ) ) return false;

		$elements = array();

		foreach ( array( 'elements', 'sequence', 'choice', 'group' ) as $typeComponent )
		{
			if ( ! isset( $type[ $typeComponent ] ) )
			{
				continue;
			}

			foreach ( $type[ $typeComponent ] as $id => $element )
			{
				if ( $id == 'restrictionType')
				{
					continue;
				}

				if ( $id == 'elements' )
				{
					$elements += $element;
					continue;
				}

				$result = $this->gatherElementsFromType( $element );
				if ( ! $result )
				{
					$elements[ "{$element['prefix']}:{$element['name']}" ] = $element;
				}

				$elements += $result;
			}

		}

		return $elements;
	}
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;
    }
1029563
protected function getSuggestedTypes($type)
    {
        $mapping = [
            'void'    => false,
            'mixed'   => false,
            'null'    => false,
            'int'     => 'int',
            'integer' => 'int',
            'string'  => 'string',
            'float'   => 'float',
            'bool'    => 'bool',
            'boolean' => 'bool',
        ];

        $typeNames = explode('|', $type);
        return array_unique(
            array_map(
                function ($typeName) use ($mapping) {
                    if (isset($mapping[$typeName])) {
                        return $mapping[$typeName];
                    }

                    if ($this->isTypeArray($typeName)) {
                        return 'array';
                    }

                    if ($this->isTypeCallable($typeName)) {
                        return 'callable';
                    }

                    if ($this->isTypeObject($typeName)) {
                        return $typeName;
                    }

                    return false;
                },
                $typeNames
            )
        );
    }
1137531
public function get($type = null)
    {
        $result = [];

        foreach ($this->session[$this->prefix] as $offset => $message) {
            if ($type === null || $message['type'] === $type) {
                $result[] = $message;
                unset($this->session[$this->prefix][$offset]);
            }
        }

        return $result;
    }
102546
public static function getSubType($type)
    {
        if (preg_match('/^(.+)\[\]$/', $type, $matches) || preg_match('/^_(.+)$/', $type, $matches)) {
            return $matches[1];
        }

        return $type;
    }
413949
protected function getType($type)
    {
        if (isset($this->typeAlias[$type])) {
            return $this->typeAlias[$type];
        }

        return $type;
    }
777052
protected function loadFields($type)
    {
        $options = $this->getUtils()->getOptions();

        $typeMap = $type . 'FieldMap';

        $fields = array();
        foreach ($this->$typeMap as $fieldName => $fieldValue) {
            if (isset($options[$fieldValue])) {
                $fields[$fieldName] = $options[$fieldValue];
            }
        }

        return $fields;
    }
727644
public function logs($type = null)
    {
        if (func_num_args()) {
            return isset($this->_logs[$type]) ? $this->_logs[$type] : [];
        }
        $logs = [];
        foreach ($this->_logs as $key => $value) {
            $logs = array_merge($logs, $value);
        }
        return $logs;
    }
1122222
private static function getClass($type)
    {
        if (!\array_key_exists($type, self::$types)) {
            throw new \RuntimeException('invalid type');
        }

        return self::$types[$type];
    }
10745
protected function getPackages($type)
    {
        $packages = $this->packages->all();

        if (! is_null($type)) {
            $packages = $packages->where('type', $type);
        }

        $results = array();

        foreach ($packages->sortBy('basename') as $package) {
            $results[] = $this->getPackageInformation($package);
        }

        return array_filter($results);
    }
227469
public function getFields($type)
    {
        if (!array_key_exists($type, $this->_fields)) {
            $fields = [];
            if ($this->config->hasPointer($type)) {
                foreach ($this->config->getPointer($type) as $item) {
                    $fields[] = $item['name'];
                }
            }
            $this->_fields[$type] = $fields;
        }

        return $this->_fields[$type];
    }
23584
protected function getKeywords($type)
    {
        if (!isset($this->keywordsCache[$type])) {
            $getter = 'get' . $type . 'Keywords';
            $keywords = $this->keywords->$getter();

            if ('Step' === $type) {
                $padded = array();
                foreach (explode('|', $keywords) as $keyword) {
                    $padded[] = false !== mb_strpos($keyword, '<', 0, 'utf8')
                        ? preg_quote(mb_substr($keyword, 0, -1, 'utf8'), '/') . '\s*'
                        : preg_quote($keyword, '/') . '\s+';
                }

                $keywords = implode('|', $padded);
            }

            $this->keywordsCache[$type] = $keywords;
        }

        return $this->keywordsCache[$type];
    }