Extracts all components for a tag.


@return string[]
963325
private function extractTagParts(string $tagLine): array
    {
        $matches = [];
        if (! preg_match('/^@(' . self::REGEX_TAGNAME . ')(?:\s*([^\s].*)|$)/us', $tagLine, $matches)) {
            throw new \InvalidArgumentException(
                'The tag "' . $tagLine . '" does not seem to be wellformed, please check it for errors'
            );
        }

        if (count($matches) < 3) {
            $matches[] = '';
        }

        return array_slice($matches, 1);
    }
719911
public function getTagNameList()
    {
        $tags = $this->owner->Tags();
        $names = [];

        foreach ($tags as $tag) {
            $names[] = $tag->Name;
        }

        return implode(', ', $names);
    }
442073
public function getAll() {
    if (is_null($this->components)) {
      $base_path = $this->getBaseComponentPath();

      $filter = function (Extension $module) use ($base_path) {
        return strpos($module->getPath(), $base_path) === 0;
      };

      $this->components = array_filter($this->discovery->scan('module'), $filter);
    }
    return $this->components;
  }
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;
		
	}
45810
public function getPostsByTag($tag)
    {
        if (false === array_key_exists($tag, $this->tagsIndex)) {
            return [];
        }

        $postNames = $this->tagsIndex[$tag];

        return $this->getPostsByName($postNames);
    }
711573
public function getTags()
    {
        return \is_string($value = $this->getContentValue('tags', null))
            ? array_unique(array_filter(explode(',', $value)))
            : null;
    }
418818
public function tags()
    {
        $result = $this->execute('list', array('--xml' => true, $this->getUrl() . '/' . $this->basePaths['tags']));

        $tags = array();
        foreach ($result as $fileinfo) {
            $tags[] = new Reference($fileinfo->getFilename(), Reference::TAG, $fileinfo->getCommit()->getRevision());
        }

        return $tags;
    }
110782
public function getTagItems(string $tag): array
    {
        $tagName = $this->getTagKey($tag);
        $keys    = $this->handler->sMembers($tagName);

        return array_map(function ($key) {
            return $this->getCacheKey($key);
        }, $keys);
    }
1293906
public function getTags()
    {
        foreach ($this->getFilters() as $filter) {
            $this->tags = array_merge($this->tags, $filter->getTags());
        }

        return $this->tags = array_values(array_unique($this->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);
                }
            }
        }
    }
619880
public function getTags(): array
    {
        $tsfe = $this->getTsfe();
        if (!($tsfe instanceof TypoScriptFrontendController)) {
            return [];
        }

        return \array_unique((array)ObjectAccess::getProperty($tsfe, 'pageCacheTags', true));
    }
874853
public function extractLinks()
    {
        if ($this->extractedLinks) {
            return $this->extractedLinks;
        }

        if (!is_html($this->body)) {
            return [];
        }

        $libxmlPreviousState = libxml_use_internal_errors(true);

        $dom = new DOMDocument;
        $dom->loadHTML($this->body);

        libxml_clear_errors();
        libxml_use_internal_errors($libxmlPreviousState);

        $links = [];

        foreach ($this->tags as $tag => $attribute) {
            foreach ($dom->getElementsByTagName($tag) as $element) {
                $link = $element->getAttribute($attribute);

                if (!$link) {
                    continue;
                }

                $links[] = clean_url(url_to_absolute($this->url, $link), true, true);
            }
        }

        return $this->extractedLinks = array_unique($links);
    }
3209
private function removeOldTagLines(): array
    {
        $tags = $this->getTagTokens();
        $firstTag = array_shift($tags);

        (new LineHelper($this->file))
            ->removeLines(
                $firstTag['line'],
                $this->tokens[$this->token['comment_closer']]['line']
            );

        return $firstTag;
    }
1138457
public function getComponents () : array
    {
        if (null === $this->components)
        {
            $this->components = $this->loader->loadComponents($this);
        }

        return $this->components;
    }
902319
public function tag(string $tag): array
    {
        return $this->hasTag($tag) ? $this->tags[$tag] : null;
    }
1264181
public function toArray()
        {
            return [
                'tag' => $this->tag,
                'void' => $this->void,
                'attributes' => $this->attributes,
                'content' => $this->recursivelyArrayify($this->content)
            ];
        }
1304457
public static function getTags()
    {
        $finder = new Tag\Finder\Finder();

        foreach (func_get_args() as $arg) {
            if (is_string($arg)) {
                $finder->addFilter(new Tag\Finder\Group($arg));
            } elseif ($arg instanceof PageInterface) {
                $finder->addFilter(new Tag\Finder\AppliedToPage($arg));
            } elseif ($arg instanceof TagInterface) {
                $finder->addFilter(new Tag\Finder\AppliedWith($arg));
            }
        }

        return $finder
            ->setOrderBy('group', 'asc')
            ->setOrderBy('name', 'asc')
            ->findAll();
    }