Adds the tag (or tags in an array) to the list of tags that will always
be self closing.

@param string|array $tag
@return Dom
@chainable
171702
public function addSelfClosingTag($tag): Dom
    {
        if ( ! is_array($tag)) {
            $tag = [$tag];
        }
        foreach ($tag as $value) {
            $this->selfClosing[] = $value;
        }

        return $this;
    }
1129513
public static function add(Tag &$Tag)
    {
        if (Config::get('store') == 'global') {
            self::$_tagStore[$Tag->ID] = &$Tag;
        } elseif (Config::get('store') == 'internal') {
            Config::getHTMLInstance()->tagStore[$Tag->ID] = &$Tag;
        }
    }
1352751
@SuppressWarnings("unchecked")
	public T tag(final String tag) {
		if (this.tags == null) {
			this.tags = new HashSet<>();
		}

		this.tags.add(tag);
		return (T) this;
	}
1242038
public function add($tag): self
    {
        if (is_string($tag)) {
            $tag = Url::create($tag);
        }

        if (! in_array($tag, $this->tags)) {
            $this->tags[] = $tag;
        }

        return $this;
    }
89212
public function tag($tags)
    {
        return $this->proxy($this->parent, $this->storage, $this->storageName)
                    ->with($this->attributes(['tag' => $tags]));
    }
819195
public function tags($tags = null)
    {
        $this->cacheTags = $tags === false ? false : $tags;
        return $this;
    }
383891
public function withTag(string $tag): self
    {
        if ($this->has($tag)) {
            return $this;
        }
        self::validateTag($tag);
        $newTags = $this->tags;
        $newTags[] = $tag;
        return new static($newTags);
    }
79648
protected function createHtmlTag(array $tag)
    {
        $tagModel = new Shopgate_Model_Redirect_HtmlTag();
        $tagModel->setName($tag['name']);

        if (empty($tag['attributes'])) {
            return $tagModel;
        }

        $attributes = array();
        foreach ($tag['attributes'] as $attribute) {
            if (empty($attribute['name'])) {
                continue;
            }

            $attributes[] = $this->createHtmlTagAttribute($attribute);
        }

        $tagModel->setAttributes($attributes);

        return $tagModel;
    }
1304318
public function addSpecialCaseTag($tag)
    {
        if (!in_array($tag, $this->specialCaseTags)) {
            $this->specialCaseTags[] = $tag;
        }

        $opening = $this->getOpeningTag($tag);
        $closing = $this->getClosingTag($tag);

        if (!in_array($opening, $this->specialCaseOpeningTags)) {
            $this->specialCaseOpeningTags[] = $opening;
        }
        if (!in_array($closing, $this->specialCaseClosingTags)) {
            $this->specialCaseClosingTags[] = $closing;
        }

        return $this;
    }
756274
public function setTags($tags)
    {
        $this->tags = [];
        $this->ref = null;

        if (is_array($tags)) {
            foreach ($tags as $tag) {
                $this->addTag($tag);
            }
        } else {
            $this->addTag($tags);
        }

        return $this;
    }
861473
public function addTag($tag, $message = null)
    {
        if ($message === null) {
            $message = $tag;
        }
        return $this->run("tag -a $tag -m $message");
    }
479984
public function addTag($tag)
    {
        $this->tag = $tag;
        $this->getLogger()->info('Adding tag: ' . $tag . ' to layout ID ' . $this->layoutId);
        $response = $this->doPost('/layout/' . $this->layoutId . '/tag', [
            'tag' => [$tag]
        ]);
        $tags = $this->hydrate($response);
        foreach ($response['tags'] as $item) {
            $tag = new XiboLayout($this->getEntityProvider());
            $tag->hydrate($item);
            $tags->tags[] = $tag;
        }
        return $this;
    }
872408
@SuppressWarnings("unchecked")
    public T addTag(String tag) {
        if (this.tags_ == null) {
            tags_ = new ArrayList<>();
        }
        this.tags_.add(tag);
        return (T) this;
    }
807791
public function removeNoSlashTag($tag): Dom
    {
        if ( ! is_array($tag)) {
            $tag = [$tag];
        }
        $this->noSlash = array_diff($this->noSlash, $tag);

        return $this;
    }
950203
public static function withTag($tag)
    {
        $element = (new ReflectionClass(static::class))->newInstanceWithoutConstructor();

        $element->tag = $tag;
        $element->attributes = new Attributes();
        $element->children = new Collection();

        return $element;
    }
663030
public function tag($tags)
    {
        foreach ($this->prepareTags($tags) as $tag) {
            $this->addTag($tag);
        }

        return true;
    }
91316
public static function open($tag, array $options = [], $self = false)
    {
        $attributes = self::attributes($options);

        //add the opened tag to $opened array
        if (!$self || is_null($self)) {
            self::$opened[] = $tag;
            //
            return '<'.$tag.$attributes.'>';
        } else {
            return '<'.$tag.$attributes.' />';
        }
    }