Get the class to handle a specific annotation tag.

@param string $tag The name of the annotation tag.
@return string
@throws \Wingu\OctopusCore\Reflection\Annotation\Exceptions\OutOfBoundsException If the annotation tag was not mapped.
194576
public function getMappedTag($tag)
    {
        if (isset($this->mappedTags[$tag]) === true) {
            return $this->mappedTags[$tag];
        } else {
            throw new OutOfBoundsException('Annotation tag "' . $tag . '" was not mapped.');
        }
    }
294634
public function get($tag)
    {
        if (!isset($this->styles[$tag])) {
            throw new OutOfBoundsException(sprintf(
                'The style tag "%s" does not exist.',
                $tag
            ));
        }

        return $this->styles[$tag];
    }
698363
public function get($name)
    {
        if (!isset($this->attributes[$name])) {
            throw new OutOfBoundsException(sprintf(
                'The attribute "%s" was not defined.',
                $name
            ));
        }

        return $this->attributes[$name];
    }
637424
public function parents($tag)
    {
        $traverseNode = $this->__currentNode__;
        $elFound = false;
        while ($traverseNode->parentNode) {
            $traverseNode = $traverseNode->parentNode;
            if ($traverseNode->tagName == $tag) {
                $this->__currentNode__ = $traverseNode;
                $elFound = true;
                break;
            }
        }

        if (!$elFound) {
            throw new \Exception("Parent $tag not found in XML");
        }

        return $this;
    }
194826
public function getTagItems(string $tag): array
    {
        $tagName = $this->getTagKey($tag);
        return explode(',', $this->handler->get($tagName));
    }
1189766
public function getSubnodesByTag($tag)
    {
        return $this
            ->getSubnodes()
            ->filter(function (\Elcodi\Component\Menu\Entity\Menu\Interfaces\NodeInterface $menuNode) use ($tag) {

                return $menuNode->getTag() == $tag;
            });
    }
650419
public function flushByTag(string $tag): int
    {
        $this->connect();

        $statementHandle = $this->databaseHandle->prepare('DELETE FROM "' . $this->cacheTableName . '" WHERE "context"=? AND "cache"=? AND "identifier" IN (SELECT "identifier" FROM "tags" WHERE "context"=? AND "cache"=? AND "tag"=?)');
        $statementHandle->execute([$this->context(), $this->cacheIdentifier, $this->context(), $this->cacheIdentifier, $tag]);

        $flushed = $statementHandle->rowCount();

        $statementHandle = $this->databaseHandle->prepare('DELETE FROM "' . $this->tagsTableName . '" WHERE "context"=? AND "cache"=? AND "tag"=?');
        $statementHandle->execute([$this->context(), $this->cacheIdentifier, $tag]);

        return $flushed;
    }
1118939
public function get_bbcode($tag)
	{
		if(!isset($this->bbcodes[$tag]))
			return null;

		return $this->bbcodes[$tag];
	}
821799
public static function tagIncrementVer($tag)
        {
            if (!$tag) {
                return false;
            }

            $time = microtime(true) * 10000;

            if (is_array($tag)) {
                foreach ($tag as $tagName) {
                    self::GetInstance()->set("\$vxnTag:{$tagName}", $time, null, self::$ttlTags);
                    if (self::$useTagsBuffer) {
                        self::$tagsBuffer[$tagName] = $time;
                    }
                }

                return true;
            }
            else if (is_string($tag) || is_numeric($tag)) {
                self::GetInstance()->set("\$vxnTag:{$tag}", $time, null, self::$ttlTags);
                if (self::$useTagsBuffer) {
                    self::$tagsBuffer[$tag] = $time;
                }

                return $time;
            }

            throw new \TypeError("'\$tag' expected to be an array, string or numeric, got " . gettype($tag));
        }
39248
private function tag($tags)
    {
        $this->initialize();

        if (!is_array($tags)) {
            $tags = [$tags];
        }
        foreach ($tags as $tag) {
            if (!is_string($tag)) {
                throw new InvalidArgumentException(sprintf('Cache tag must be string, "%s" given', is_object($tag) ? get_class($tag) : gettype($tag)));
            }
            if (isset($this->tags[$tag])) {
                continue;
            }
            if (!isset($tag[0])) {
                throw new InvalidArgumentException('Cache tag length must be greater than zero');
            }
            if (isset($tag[strcspn($tag, '{}()/\@:')])) {
                throw new InvalidArgumentException(sprintf('Cache tag "%s" contains reserved characters {}()/\@:', $tag));
            }
            $this->tags[$tag] = $tag;
        }

        return $this;
    }
852513
protected function get_shortcode_atts_parser_class( $tag ) {
		$atts_parser = $this->hasConfigKey( $tag, self::KEY_CUSTOM_ATTS_PARSER )
			? $this->getConfigKey( $tag, self::KEY_CUSTOM_ATTS_PARSER )
			: self::DEFAULT_SHORTCODE_ATTS_PARSER;

		return $atts_parser;
	}
824404
private function _parseTag($tag)
        {   
//          return nothing if the tag is disabled
            if(isset($tag['attributes']->disabled) === true && $tag['attributes']->disabled === 'true')
            {
                return '';
            }
            
            $tag_data = false;
            $caching_tag = isset($tag['attributes']->cache) && $tag['attributes']->cache === 'false' ? false : true;
            if($this->_options['cache_tags'] === true && $caching_tag === true)
            {
                if($this->_options['custom_cache_tag_class'] !== false)
                {
                    $tag_data = call_user_func_array(array($this->_options['custom_cache_tag_class'], 'getCache'), array($tag));
                }
                else 
                {
                    $cache_file = $this->_options['cache_directory'].md5(serialize($tag));
                    if(is_file($cache_file) === true)
                    {
                        $tag_data = file_get_contents($cache_file);
                    }
                }
                if($tag_data)
                {
                    $tag['cached'] = true;
                    return $tag_data;
                }
            }    
            
//          look for and load tag function file
            $tag_func_name = ucwords(str_replace(array('_', '-'), ' ', $tag['name']));
            $tag_func_name = strtolower(substr($tag_func_name, 0, 1)).substr($tag_func_name, 1);
            $func_name = str_replace(' ', '', $this->_options['tag_callback_prefix'].$tag_func_name);
            $tag_data = '';
            $collect_tag = false;
            $tag_order = false;
            if(function_exists($func_name) === false)
            {
                $has_resource = false;
                if(is_array($this->_options['tag_directory']) === false)
                {
                    $this->_options['tag_directory'] = array($this->_options['tag_directory']);
                }
                foreach ($this->_options['tag_directory'] as $directory)
                {
                    $tag_file = rtrim($directory, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$tag['name'].DIRECTORY_SEPARATOR.'tag.php';
                    if(is_file($tag_file) === true)
                    {
                        if(isset(self::$_required[$tag['name']]) === false)
                        {
                            self::$_required[$tag['name']] = true;
                            $collect = false;
                            if(function_exists($func_name) === false)
                            {
                                include_once $tag_file;
                            }
                            self::$_tags_to_collect[$tag['name']] = $collect;
                            if(function_exists($func_name) === false)
                            {
                                return self::throwError($tag['name'], 'tag resource "'.$directory.DIRECTORY_SEPARATOR.'tag.php" found but callback "'.$func_name.'" wasn\'t.');
                            }
                            $has_resource = true;
                        }
                    }
                }
                if($has_resource === false)
                {
                    return self::throwError($tag['name'], 'tag resource not found.');
                } 
            }
            
//          do we have to collect this tag for parsing at a later point
            if(self::$_tags_to_collect[$tag['name']] !== false)
            {
                if(isset(self::$tag_collections[$tag['name']]) === false)
                {
                    self::$tag_collections[$tag['name']] = array();
                }
                $tag['collected'] = true;
                $index = array_push(self::$tag_collections[$tag['name']], $tag)-1;
                if($tag_order !== false)
                {
                    if(isset(self::$_tag_order[$block['name']]) === false)
                    {
                        self::$_tag_order[$block['name']] = array();
                    }
                    self::$_tag_order[$block['name']] = $tag_order;
                }
                return self::$tag_collections[$tag['name']][$index]['tag'] = '------@@%'.self::$_instance.'-'.$tag['name'].'-'.$index.'-'.uniqid(time().'-').'%@@------';
            }
            
//          excecute the tag callback
            if($this->_options['tag_global_callback'] !== false)
            {
                $tag_data = trim(call_user_func($this->_options['tag_global_callback'], 'tag', $func_name, $tag));
            }
            else
            {
                $tag_data = trim(call_user_func($func_name, $tag));
            }
            
//          this is where we sniff for buried tags within the returned content
            if(empty($tag_data) === false)
            {
                if($this->_options['sniff_for_buried_tags'] === true && strpos($tag_data, self::$tag_open.$this->_options['tag_name'].':') !== false)
                {
//                  we have the possibility of buried tags so lets parse
//                  but first make sure the output isn't echoed out
                    $old_echo_value = $this->_options['echo_output'];
                    $this->_options['echo_output'] = false; 
//                  parse the tag_data 
                    $tag_data = $this->parse($tag_data, false, true);
//                  restore the echo_output value back to what it was originally
                    $this->_options['echo_output'] = $old_echo_value;
                }
                
                if($this->_options['cache_tags'] === true && $caching_tag === true)
                {
                    if($this->_options['custom_cache_tag_class'] !== false)
                    {
                        call_user_func_array(array($this->_options['custom_cache_tag_class'], 'cache'), array($tag, $tag_data));
                    }
                    else
                    {
                        file_put_contents($this->_options['cache_directory'].md5(serialize($tag)), $tag_data, LOCK_EX);
                    }
                }
            }
            return $tag_data;
        }
1012697
public function getExtension($name)
    {
        if ($extension = $this->nearestForClass($name)) {
            return $extension;
        }

        throw new OutOfBoundsException(get_class($this).": No extension named \"$name\" found");
    }
338687
private function getEntityClassName($entityName)
    {
        if (!isset($this->entityClassMap[ $entityName ])) {
            $className = $entityName;
            if (!class_exists($className)) {
                $className = $this->defaultNamespace . $entityName;
                if (!class_exists($className)) {
                    //Cache that the class does not exist
                    $className = false;
                }
            }
            $this->entityClassMap[ $entityName ] = $className;
        }

        if ($this->entityClassMap[ $entityName ] === false) {
            throw new \OutOfBoundsException("Unknown entity {$entityName}");
        }

        return $this->entityClassMap[ $entityName ];
    }
454986
private function tag_has_name(string $tag){
    return in_array('name', array_values(
      \is_array($this->tags[$tag]) ?
        $this->tags[$tag] :
        $this->tags[$this->tags[$tag]]
    ));
  }
65646
public function findRouteByTag($tag)
    {
        $route = $this->each(function(Route $route) use($tag)
        {
            if($route->hasProperty('tag') && $route->getProperty('tag') == $tag)
                return $route;
        }, true);

        return $route ? : null;
    }
963161
public function withTag($tag) {
        if (is_null($this->tags)) {
            $this->tags = [];
        }

        array_push($this->tags, $tag);
        return $this;
    }