Checks whether a tag is present

@param string $tagName
@return boolean
199820
public function hasTag($tagName) {
		return $this->tags->search($tagName, function (AbstractTag $tag, $query) {
			return $tag->getTagName() == $query;
		});
	}
619266
public function isFlag($optionName)
    {
        return isset($this->options[$optionName]) && !empty($this->options[$optionName]['flag']);
    }
521974
public function getNodeByTagName($tagName)
    {
        $result = [];

        foreach ($this as $node) {
            if ($node->tagName === $tagName) {
                $result[] = $node;
            }
        }

        return $result;
    }
1081682
public function isClassTaggedWith($className, $tag)
    {
        if ($this->initialized === false) {
            return false;
        }
        if (!isset($this->reflectedClassNames[$className])) {
            $this->reflectClass($className);
        }
        if (!isset($this->classTagsValues[$className])) {
            return false;
        }
        return isset($this->classTagsValues[$className][$tag]);
    }
1023008
public function hasTag(Array $tags)
    {
        // if no tags were specified, the fixture should always be loaded
        if (count($this->tags) == 0 || count(array_intersect($this->tags, $tags)) > 0) {
            return true;
        }

        return false;
    }
683681
private function tag_has_desc(string $tag){
    return in_array('description', array_values(
      \is_array($this->tags[$tag]) ?
        $this->tags[$tag] :
        $this->tags[$this->tags[$tag]]
    ));
  }
534592
public function getTag($tagName)
    {
        foreach ($this->tags as $tag) {
            if ($tag['name'] === $tagName) {
                return $tag;
            }
        }

        throw new \InvalidArgumentException(sprintf(
            'Unknown tag "%s"', $tagName
        ));
    }
394747
private final boolean isAlone(
        String tagName,
        String aloneTags[]
    ) {
        if (aloneTags == null)
            return false;

        if (tagName == null)
            return false;

        for (int i = 0; i < aloneTags.length; i++) {
            if (tagName.equalsIgnoreCase(aloneTags[i]))
                return true;
        }

        return false;
    }
909826
protected function validateTagToken(TagToken $token) : bool
    {
        $tagName = $token->getTagName();
        $tagDef = $this->tagDefs->get($tagName);
        if (!isset($tagDef)) {
            return false;
        }

        return $tagDef->validate($token);
    }
1069081
public function getPropertiesByTagName($tagName)
    {
        $properties = [];

        foreach ($this->properties as $property) {
            foreach ($property->tags as $tag) {
                if ($tag['name'] == $tagName) {
                    $properties[$property->name] = $property;
                }
            }
        }

        return $properties;
    }
872499
public function hasTagged(int $tag): bool
    {
        // lazily build lookup map
        if (!isset($this->_taggedMap)) {
            $this->_taggedMap = [];
            foreach ($this->_elements as $element) {
                if ($element->isTagged()) {
                    $this->_taggedMap[$element->tag()] = $element;
                }
            }
        }
        return isset($this->_taggedMap[$tag]);
    }
253712
public function hasTag(Tag $tag)
    {
        foreach ($this->_tags as $knownTag) {
            if ($knownTag->getId() == $tag->getId()) {
                return true;
            }
        }

        return false;
    }
828063
private boolean keepTag(final String tagName) {

        boolean result = false;
        // include mode:
        if (m_visibleTags.size() > 0) {
            if (m_visibleTags.contains(tagName)) {
                result = true;
            } else {
                result = false;
            }
        }
        // Power of hide: if no visible tags configured this works as a normal remove,
        // if visible tags are configured this can change a visible tag to be invisible
        if (m_invisibleTags.contains(tagName)) {
            result = false;
        }

        return result;
    }
901503
public function isValid($tag)
    {
        if (strlen($this->tagPrefix) > 0 && strpos($tag, $this->tagPrefix) !== 0) {
            return false;
        }

        return preg_match('/^' . $this->regex . '$/', substr($tag, strlen($this->tagPrefix))) == 1;
    }
6105
protected function getTagObject($tagName)
    {
        if (!$this->extensionsLoaded) {
            $this->loadExtensions();
        }

        if (!array_key_exists($tagName, $this->tagObjects)) {
            return null;
        }

        $tagObject = $this->tagObjects[$tagName];
        $tagObject->setParsingCssObject($this->parsingCss);
        $tagObject->setCssConverterObject($this->cssConverter);
        $tagObject->setPdfObject($this->pdf);
        if (!is_null($this->debug)) {
            $tagObject->setDebugObject($this->debug);
        }

        return $tagObject;
    }
543425
public function removeUnprocessableHtmlTag($tagName)
    {
        $key = \array_search($tagName, $this->unprocessableHtmlTags, true);
        if ($key !== false) {
            unset($this->unprocessableHtmlTags[$key]);
        }
    }
105286
public function getElementByTagName($tagName)
    {
        if (null === $this->treeRoot){
            return array();
        }
        $children = $this->treeRoot->getChildren();

        return $this->getElementByTagInChildren($children, $tagName);
    }