Check if a tag is set in the comment
@param string $tag Tag to check for e.g. ignore = @ignore
@return boolean
186115
public function hasTag ($tag)
	{
		
		foreach ($this->lines as $line)
		{
			if (strpos ($line, '@' . $tag) === 0)
			{
				return TRUE;
			}
		}
		
		return FALSE;
		
	}
919095
public function checkIfTagMatchesRecords($tag)
    {
        // if tag list is empty, fetch them from the result list
        // otherwise use the cached result list
        if (!$this->tagsInSearchResult) {
            $this->tagsInSearchResult = $this->pObj->tagsInSearchResult = $this->db->getTagsFromSearchResult();
            $GLOBALS['TSFE']->fe_user->setKey('ses', 'ke_search.tagsInSearchResults', $this->tagsInSearchResult);
        }

        return array_key_exists($tag, $this->tagsInSearchResult);
    }
126653
public function assertElementVisibility($tag, $text) {
    $element = $this->getSession()->getPage();
    /** @var \Behat\Mink\Element\NodeElement[] $nodes */
    $nodes = $element->findAll('css', $tag);
    foreach ($nodes as $node) {
      if ($node->getText() === $text) {
        $this->assertElementVisible($text, $node);
      }
    }
  }
1283973
public static function isAction($tag)
    {
        $that = self::getInstance(self::$id);

        return isset($that->callbacks[$tag]);
    }
3995
public function setTag($tag)
    {
        if (in_array($tag, $this->getParent()->allowed_tags)) {
            throw new \Exception($tag.' can not be changed as it is not allowed under '.$this->getParent()->getTag().'.');
        }

        $this->tag = $tag;

        return $this;
    }
499181
private function tag_close($tag)
	{
		if(!$this->current_tag instanceof Node_Container_Document
			&& $tag !== $this->current_tag->tag())
		{
			$closing_tags = $this->bbcodes[$this->current_tag->tag()]->closing_tags();

			if(in_array($tag, $closing_tags) || in_array('/' . $tag, $closing_tags))
				$this->current_tag = $this->current_tag->parent();
		}

		if($this->current_tag instanceof Node_Container_Document)
			return false;
		else if($tag !== $this->current_tag->tag())
		{
			// check if this is a tag inside another tag like
			// [tag1] [tag2] [/tag1] [/tag2]
			$node = $this->current_tag->find_parent_by_tag($tag);

			if($node !== null)
			{
				$this->current_tag = $node->parent();

				while(($node = $node->last_tag_node()) !== null)
				{
					$new_node = new Node_Container_Tag($node->tag(), $node->attributes());
					$this->current_tag->add_child($new_node);
					$this->current_tag = $new_node;
				}
			}
			else
				return false;
		}
		else
			$this->current_tag = $this->current_tag->parent();

		return true;
	}
876891
public function isVoidElement($tag = null)
    {
        if (null === $tag) {
            $tag = $this->getTag();
        }

        return in_array($tag, $this->voidElements);
    }
150893
public boolean hasOneTag(Tag... tags) {
        for(Tag t : tags) {
            if (this.tags.contains(t)) return true;
        }
        return false;
    }
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]);
    }
13880
public function removeTag($tag)
    {
        $index = array_search($tag, $this->tags);

        if ($index !== false) {
            array_splice($this->tags, $index, 1);
            $this->ref = null;
        }

        return $this;
    }
66184
public function checkTag(Tag $tag)
	{
		if (isset($tag->template) && !($tag->template instanceof UnsafeTemplate))
		{
			$template = (string) $tag->template;
			$this->checkTemplate($template, $tag);
		}
	}
712194
public function purgeUrlsByTag(string $tag)
    {
        try {
            if ($urls = $this->getTaggedUrls($tag)) {

                $this->purgeUrls(array_values($urls));
                $this->invalidateLocalCache(array_keys($urls));

                return true;
            }
        } catch (Exception $e) {
            \Craft::warning("Failed to purge '$tag'.", "upper");
        }

        return false;
    }
1191801
public function deleteByTags($tag)
    {
        if (!isset($this->tags[$tag])) {
            return false;
        }

        foreach ($this->tags[$tag] as $key) {
            $this->delete($key);
        }

        return true;
    }
894852
protected function removeOneTag($tag) {
        if ($tag = Tag::findBy('tag', $tag))
            $this->tags()->detach($tag);
    }
993991
function has_filter( $tag, $function_to_check = false ) {
            $this->_logger->entrance( $tag );

            return has_filter( $this->get_action_tag( $tag ), $function_to_check );
        }
54482
public function getTag($tag) {
        if (isset($this->_tags[$tag])) {
            return $this->_tags[$tag];
        }

        throw new MissingFilterException(sprintf('No filter can be found with %s tag', $tag));
    }
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;
    }