Get all GeneralName objects of given type.

@param int $tag One of <code>GeneralName::TAG_*</code> enumerations
@return GeneralName[]
964687
public function allOf(int $tag): array
    {
        $names = array_filter($this->_names,
            function (GeneralName $name) use ($tag) {
                return $name->tag() == $tag;
            });
        return array_values($names);
    }
1224338
private function getServiceListByTag($tag)
    {
        $services = [];
        $serviceIds = [];
        $serviceDefinitions = $this->container->getDefinitions();

        foreach ($tag as $tagId) {
            $serviceIds = array_merge(
                $serviceIds,
                array_keys($this->container->findTaggedServiceIds($tagId))
            );
        }

        foreach ($serviceIds as $serviceId) {
            $serviceDefinition = $serviceDefinitions[$serviceId];
            if ($serviceDefinition) {
                $services[] = [$serviceId, $serviceDefinition->getClass()];
            }
        }

        usort($services, [$this, 'compareService']);
        return $services;
    }
233364
protected function getStyleCodes(string $tag): array
	{
		if(isset($this->styles[$tag]))
		{
			return [$this->styles[$tag]];
		}
		elseif(isset($this->userStyles[$tag]))
		{
			$codes = [];

			foreach($this->userStyles[$tag] as $tag)
			{
				$codes = array_merge($codes, $this->getStyleCodes($tag));
			}

			return $codes;
		}

		throw new FormatterException(vsprintf('Undefined formatting tag [ %s ] detected.', [$tag]));
	}
633000
public function resolveTagNames($tagNames)
    {
        $resolvedTags = [];

        foreach ($tagNames as $tagName) {
            $tag = $this->findByName($tagName);
            if (null !== $tag) {
                $resolvedTags[] = $tag->getId();
            }
        }

        return $resolvedTags;
    }
861902
public function taggedWith($tag)
    {
        $results = [];

        if (isset($this->tags[$tag]))
        {
            foreach ($this->tags[$tag] as $view)
            {
                $results[] = $view;
            }

        }

        return $results;
    }
772588
public function getImagesByTag($tag = null)
    {
        $images = $this->model->orderBy('created_at', 'desc')->where('is_published', 1);

        if (!is_null($tag)) {
            $images->where('tags', 'LIKE', '%'.$tag.'%');
        }

        return $images;
    }
587266
public static function getGlosa($tag)
    {
        if (!isset(self::$tablas[$tag]))
            return false;
        return is_array(self::$tablas[$tag]) ? self::$tablas[$tag]['glosa'] : self::$tablas[$tag];
    }
265834
public function getTags(): array
    {
        $typeTag = $this->implode([
            'graphql',
            strtolower($this->fieldValue->getParentName()),
            $this->fieldKey,
        ]);

        $fieldTag = $this->implode([
            'graphql',
            strtolower($this->fieldValue->getParentName()),
            $this->fieldKey,
            $this->resolveInfo->fieldName,
        ]);

        return [$typeTag, $fieldTag];
    }
709305
public function getTags ($tag)
	{
		
		$tags	= array ();
		
		foreach ($this->lines as $line)
		{
			if (strpos ($line, '@' . $tag) === 0)
			{
				$tags[]	= trim (substr ($line, strlen ('@' . $tag)));
			}
		}
		
		return $tags;
		
	}
544357
private function getAllTags()
    {
        if ($comment = $this->getDocComment()) {
            if (preg_match_all("/\@(\w+)(.*)/", $comment, $m)) {
                foreach ($m[0] as $i => $result) {
                    $tagName = $m[1][$i];
                    $tagValue = trim($m[2][$i]);
                    $this->setTag($tagName, $tagValue);
                }
            }
        }
    }
591517
public function getTags(int $type = null): array
    {
        if ($type === null) {
            return $this->tags;
        }

        return array_filter($this->tags, function (Tag $tag) use ($type): bool {
            return $tag->getType() === $type;
        });
    }
541687
public function getClassTagValues($className, $tag)
    {
        if (!isset($this->reflectedClassNames[$className])) {
            $this->reflectClass($className);
        }
        if (!isset($this->classTagsValues[$className])) {
            return [];
        }
        return isset($this->classTagsValues[$className][$tag]) ? $this->classTagsValues[$className][$tag] : [];
    }
1264940
public function getSessionsByTag($tag)
    {
        $taggedSessions = [];
        foreach ($this->metaDataCache->getByTag(Session::TAG_PREFIX . $tag) as $sessionIdentifier => $sessionInfo) {
            $session = new Session($sessionIdentifier, $sessionInfo['storageIdentifier'], $sessionInfo['lastActivityTimestamp'], $sessionInfo['tags']);
            $taggedSessions[] = $session;
        }
        return $taggedSessions;
    }
548576
protected function getAnnotationClass($tag)
    {
        if ($this->tagsMapper !== null && $this->tagsMapper->hasMappedTag($tag) === true) {
            return $this->tagsMapper->getMappedTag($tag);
        } elseif (class_exists(__NAMESPACE__ . '\Tags\\' . ucfirst($tag) . 'Tag') === true) {
            return __NAMESPACE__ . '\Tags\\' . ucfirst($tag) . 'Tag';
        } else {
            return __NAMESPACE__ . '\Tags\BaseTag';
        }
    }
241504
public static function statusNames(string $tag): array
    {
        $status_names = [];
        foreach (self::statusCodes($tag) as $status_code) {
            $status_names[$status_code] = self::statusName($status_code);
        }
        uasort($status_names, '\Fisharebest\Webtrees\I18N::strcasecmp');

        return $status_names;
    }
968206
public function getCreators($tag = null)
    {
        $tag = is_null($tag) ? [] : (is_array($tag) ? $tag : [$tag]);

        return array_values(array_filter(Person::get($this), function (Person $person) use ($tag) {
            return empty($tag) || in_array($person->getType(), $tag);
        }));
    }
908599
public function tagged($tag)
    {
        if (! isset($this->tags[$tag])) {
            return [];
        }

        return new RewindableGenerator(function () use ($tag) {
            foreach ($this->tags[$tag] as $abstract) {
                yield $this->make($abstract);
            }
        }, count($this->tags[$tag]));
    }