The value of a tag (concatenated for multiple values).

@param string $tag
@param string $sep The seperator for concatenating

@return string|null
168498
public function tagImplode(string $tag, string $sep = ' '): ?string
    {
        return $this->hasTag($tag) ? implode($sep, $this->tags[$tag]) : null;
    }
433520
public static function remove(string $list, string $item, string $separator, string $tag = ''): string
    {
        $items = self::explode($separator, $list);
        $pos = self::pos($list, $item, $separator, $tag);
        if ($pos > -1 && isset($items[$pos])) {
            unset($items[$pos]);
        }
        return implode($separator, $items);
    }
963161
public function withTag($tag) {
        if (is_null($this->tags)) {
            $this->tags = [];
        }

        array_push($this->tags, $tag);
        return $this;
    }
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]]
    ));
  }
285663
function find_ancestor_tag($tag)
    {
        global $debug_object;
        if (is_object($debug_object)) { $debug_object->debug_log_entry(1); }

        // Start by including ourselves in the comparison.
        $returnDom = $this;

        while (!is_null($returnDom))
        {
            if (is_object($debug_object)) { $debug_object->debug_log(2, "Current tag is: " . $returnDom->tag); }

            if ($returnDom->tag == $tag)
            {
                break;
            }
            $returnDom = $returnDom->parent;
        }
        return $returnDom;
    }
186115
public function hasTag ($tag)
	{
		
		foreach ($this->lines as $line)
		{
			if (strpos ($line, '@' . $tag) === 0)
			{
				return TRUE;
			}
		}
		
		return FALSE;
		
	}
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.' />';
        }
    }
108923
public function findByTag($tag)
    {
        return $this->createQueryBuilder('p')
            ->join('p.tags', 't')
            ->where('p.active = true')
            ->andWhere('t.name = :name')
            ->setParameter('name', $tag)
            ->orderBy('p.datePublished', 'DESC')
            ->getQuery()
            ->getResult();
    }
1056103
public function getTag($tag)
    {
        return isset($this->tags[$tag]) ? $this->tags[$tag] : null;
    }
538010
public function offsetUnset($offset)
    {
        $this->tags = array_filter($this->tags, function ($tag) use ($offset) {
            return $tag !== $offset->getValue();
        });
    }
88400
public static function add(string $list, string $item, string $separator, string $tag = ''): string
    {
        $items = self::explode($separator, $list);
        if (!in_array($tag . $item . $tag, $items)) {
            $items[] = $tag . $item . $tag;
        }
        return implode($separator, $items);
    }
476936
protected static function _determineUniversalImplClass(int $tag): string
    {
        if (!array_key_exists($tag, self::MAP_TAG_TO_CLASS)) {
            throw new \UnexpectedValueException(
                "Universal tag $tag not implemented.");
        }
        return self::MAP_TAG_TO_CLASS[$tag];
    }
555552
public function getTagPath($tag = null)
    {
        $path = $this->root . DIRECTORY_SEPARATOR . static::TAG_CACHE_DIR;
        if ($tag) {
            // Flip the tag so we put id first so it gets sliced into folders.
            // (otherwise we would easily reach inode limits on file system)
            $tag = strrev($tag);
            $path .= DIRECTORY_SEPARATOR . substr($tag, 0, 2) . DIRECTORY_SEPARATOR . substr($tag, 2, 2) . DIRECTORY_SEPARATOR . substr($tag, 4);
        }

        return $path;
    }
1316757
public static function tagToName(int $tag): string
    {
        if (!array_key_exists($tag, self::MAP_TYPE_TO_NAME)) {
            return "TAG $tag";
        }
        return self::MAP_TYPE_TO_NAME[$tag];
    }
653863
protected function reserveTag($content, $tag)
    {
        if (stripos($content, '<' . $tag) !== false) {

            if (in_array(strtolower($tag), array('img'))) {
                $pattern = '~(<' . preg_quote($tag, '~') . '[^>]+\>)~i';
            } else {
                $pattern = '~(<' . preg_quote($tag, '~') . '\\b[^>]*?>[\\s\\S]*?<\\/' . preg_quote($tag, '~') . '>)~i';
            }

            return preg_replace_callback($pattern, array($this, 'placeHolder'), $content);
        }

        return $content;
    }
204829
protected function get($tag)
    {
        if (isset($this->data[$tag])) {
            return $this->data[$tag];
        }

        return null;
    }
1216161
public function addString($string, $seperator = ' ')
	{
		$inputArray = explode($seperator, $string);
		$tagArray = array();
		foreach ($inputArray as $inputTag) {
			$tagArray[]=$this->formatTag($inputTag);
		}
		$this->addTags($tagArray);
	}