src/Template.php
public function hasTag($tag)
    {
        // check if all tags exist
        if (is_array($tag)) {
            foreach ($tag as $t) {
                if (!$this->hasTag($t)) {
                    return false;
                }
            }

            return true;
        }

        // check if tag exist
        $a = explode('#', $tag);
        $tag = array_shift($a);
        //$ref = array_shift($a); // unused

        return isset($this->tags[$tag]) || $this->isTopTag($tag);
    }
public function hasTag($tag)
    {
        // check if all tags exist
        if (is_array($tag)) {
            foreach ($tag as $t) {
                if (!$this->hasTag($t)) {
                    return false;
                }
            }

            return true;
        }

        // check if tag exist
        $a = explode('#', $tag);
        $tag = array_shift($a);
        //$ref = array_shift($a); // unused

        return isset($this->tags[$tag]) || $this->isTopTag($tag);
    }
public function hasTag ( $ tag ) { // check if all tags exist if ( is_array ( $ tag ) ) { foreach ( $ tag as $ t ) { if ( ! $ this -> hasTag ( $ t ) ) { return false ; } } return true ; } // check if tag exist $ a = explode ( '#' , $ tag ) ; $ tag = array_shift ( $ a ) ; //$ref = array_shift($a); // unused return isset ( $ this -> tags [ $ tag ] ) || $ this -> isTopTag ( $ tag ) ; }
Checks if template has defined a specified tag.
If multiple tags are passed in as array, then return true if all of them exist.

@param string|array $tag

@return bool
Checks if template has defined a specified tag . If multiple tags are passed in as array then return true if all of them exist .