Fluent setter for the property tags

@param $tag
@return $this
963161
public function withTag($tag) {
        if (is_null($this->tags)) {
            $this->tags = [];
        }

        array_push($this->tags, $tag);
        return $this;
    }
905359
public function addTag(Tag $tag)
    {
        // Add tag if not existing
        if (!$this->hasTag($tag)) {
            $this->tags[$tag->getTag()] = $tag;
        }

        // Increment counter if no override in the Tag entity
        if ($tag->getCounter() === null) {
            $tag->incCounter();
        }

        // Store the max counter
        if ($tag->getCounter() > $this->max) {
            $this->max = $tag->getCounter();
        }

        return $this;
    }
454251
public function detachTag(Tag $tag)
    {
        if (!$this->hasTag($tag)) {
            throw new OutOfBoundsException('Tag '.$tag->getName().' is not attached');
        }

        $this->_tags = array_filter($this->_tags, function ($knownTag) use ($tag) {
            return $tag->getId() != $knownTag->getId();
        });

        return $this;
    }
27908
public function append(Tag $tag) : Tag
    {
        if ($this->isVoid) {
            throw new \LogicException('Void elements cannot have any contents.');
        }

        $this->content .= $tag->render();

        return $this;
    }
650173
protected function pushContext(Tag $tag)
	{
		$tagName   = $tag->getName();
		$tagFlags  = $tag->getFlags();
		$tagConfig = $this->tagsConfig[$tagName];

		++$this->cntTotal[$tagName];

		// If this is a self-closing tag, the context remains the same
		if ($tag->isSelfClosingTag())
		{
			return;
		}

		// Recompute the allowed tags
		$allowed = [];
		if ($tagFlags & self::RULE_IS_TRANSPARENT)
		{
			foreach ($this->context['allowed'] as $k => $v)
			{
				$allowed[] = $tagConfig['allowed'][$k] & $v;
			}
		}
		else
		{
			foreach ($this->context['allowed'] as $k => $v)
			{
				$allowed[] = $tagConfig['allowed'][$k] & (($v & 0xFF00) | ($v >> 8));
			}
		}

		// Use this tag's flags as a base for this context and add inherited rules
		$flags = $tagFlags | ($this->context['flags'] & self::RULES_INHERITANCE);

		// RULE_DISABLE_AUTO_BR turns off RULE_ENABLE_AUTO_BR
		if ($flags & self::RULE_DISABLE_AUTO_BR)
		{
			$flags &= ~self::RULE_ENABLE_AUTO_BR;
		}

		++$this->cntOpen[$tagName];
		$this->openTags[] = $tag;
		$this->context = [
			'allowed'       => $allowed,
			'flags'         => $flags,
			'inParagraph'   => false,
			'parentContext' => $this->context
		];
	}
905253
public function setTags($value)
    {
        if (!is_array($value)) {
            $value = [$value];
        }

        $this->values['tags'] = implode(',', $value);

        return $this;
    }
808904
private function set_tags(){
    if ( $this->mode ){
      if ( $this->mode === 'vue' ){
        $tags = \bbn\x::merge_arrays($this->all_tags['js'], $this->all_tags['vue']);
      }
      else {
        $tags = $this->all_tags[$this->mode];
      }
      $this->tags = \bbn\x::merge_arrays($this->all_tags['common'], $tags);
      return $this->tags;
    }
  }
418480
public function setCustom($tag, $value = null)
    {
        if (is_array($tag)) {
            foreach ($tag as $key => $val) {
                $this->setCustom($key, $val);
            }

            return $this;
        }
        $this->args['custom'][$tag] = $value;

        return $this;
    }
874897
public function removeTag(TagInterface $tag)
    {
        if ($this->tags->contains($tag)) {
            $this->tags->removeElement($tag);
        }

        return $this;
    }
443125
public Rule setTags(String[] tags) {
    this.tags = tags == null ? null : StringUtils.join(tags, ',');
    return this;
  }
689787
public <R extends Request<T>> R setTag(Object tag) {
        checkIfActive();
        this.tag = tag;
        return (R) this;
    }
853009
public function getTag($tag)
    {
        if (!isset($this->tags[ $tag ])) {
            throw new \OutOfBoundsException("Tag {$tag} does not exist.");
        }

        return $this->tags[ $tag ];
    }
1190445
public function removeTags(array $tags)
    {
        $this->tagsChanges['removed'] = array_unique(
            array_merge($this->tagsChanges['removed'], $tags)
        );

        return $this;
    }
653297
public function addTag($tag)
    {
        if (count($this->tags) >= self::TAG_ITEMS_LIMIT) {
            throw new Exception\GoogleVideoUrlTagException(
                sprintf('The tags limit of %d items is exceeded.', self::TAG_ITEMS_LIMIT)
            );
        }

        $this->tags[] = $tag;

        return $this;
    }
519805
public function addNoSlashTag($tag): Dom
    {
        if ( ! is_array($tag)) {
            $tag = [$tag];
        }
        foreach ($tag as $value) {
            $this->noSlash[] = $value;
        }

        return $this;
    }
442060
@SuppressWarnings("unchecked")
    public <T extends XPathBuilder> T setTag(final String tag) {
        this.tag = tag;
        return (T) this;
    }
486006
public function deleteMatchingTag($tag)
    {
        $this->collection->batchDelete(function (\Sokil\Mongo\Expression $e) use ($tag) {
            return $e->where(Cache::FIELD_NAME_TAGS, $tag);
        });
        
        return $this;
    }