Load Webmaster tags
480405
public function loadWebmasterTags()
	{
		foreach ($this->webmaster as $name => $value):
			if (!empty($value)):
				$meta = array_get(self::$webmasterTags, $name, $name);
				$this->addMeta($meta, $value);
			endif;
		endforeach;
	}
694487
def load_from_config(self, config):
        """"""
        self.site = config.get("id", False)
        self.classification = config.get("class", False)
        self.tags = config.get("tags", False)
        self._load_key_value(
            config.get("key_value_data", False)
        )
        self._load_data(
            config.get("specific_data", False)
        )
        self._load_crumb(
            config.get("crumbs", False)
        )
        self._load_media_list(
            config.get("media", False)
        )
        self.unique_field = self.data_dict.get(
            config.get("unique_field", False),
            False
        )
82873
def tag(self, name, attrs=None, selfclosing=None):
        """"""
        if self.disable_tags > 0:
            return

        if name in self.linkable_tags and attrs and len(attrs) > 0:
            for attrib in attrs:
                if attrib[0] in self.linkable_attrs:
                    attrib[1] = INTERNAL_LINK.sub('{\g<1>}', attrib[1])

        super().tag(name, attrs, selfclosing)
298336
def set_tags(
            self,
            tags=""):
        
        self.refresh
        tagList = []
        regex = re.compile(r'@[^@]*', re.S)
        matchList = regex.findall(tags)
        for m in matchList:
            tagList.append(m.strip().replace("@", ""))

        self.refresh
        oldContent = self.to_string(indentLevel=1)
        self.tags = tagList
        newContent = self.to_string(indentLevel=1)

        # ADD DIRECTLY TO CONTENT IF THE PROJECT IS BEING ADDED SPECIFICALLY TO
        # THIS OBJECT
        self.parent._update_document_tree(
            oldContent=oldContent,
            newContent=newContent
        )
        self.refresh
        return None
1121332
private function loadHtml()
    {
        $this->original_html = $this->html;

        $this->logger->debug('Parsing URL: ' . $this->url);

        if ($this->url) {
            $this->domainRegExp = '/' . strtr(preg_replace('/www\d*\./', '', parse_url($this->url, PHP_URL_HOST)), ['.' => '\.']) . '/';
        }

        mb_internal_encoding('UTF-8');
        mb_http_output('UTF-8');
        mb_regex_encoding('UTF-8');

        // HACK: dirty cleanup to replace some stuff; shouldn't use regexps with HTML but well...
        if (!$this->flagIsActive(self::FLAG_DISABLE_PREFILTER)) {
            foreach ($this->pre_filters as $search => $replace) {
                $this->html = preg_replace($search, $replace, $this->html);
            }
            unset($search, $replace);
        }

        if ('' === trim($this->html)) {
            $this->html = '<html></html>';
        }

        /*
         * Use tidy (if it exists).
         * This fixes problems with some sites which would otherwise trouble DOMDocument's HTML parsing.
         * Although sometimes it makes matters worse, which is why there is an option to disable it.
         */
        if ($this->useTidy) {
            $this->logger->debug('Tidying document');

            $tidy = tidy_repair_string($this->html, $this->tidy_config, 'UTF8');
            if (false !== $tidy && $this->html !== $tidy) {
                $this->tidied = true;
                $this->html = $tidy;
                $this->html = preg_replace('/[\r\n]+/is', "\n", $this->html);
            }
            unset($tidy);
        }

        $this->html = mb_convert_encoding($this->html, 'HTML-ENTITIES', 'UTF-8');

        if ('html5lib' === $this->parser) {
            $this->dom = Parser::parse($this->html);
        }

        if ('libxml' === $this->parser) {
            libxml_use_internal_errors(true);

            $this->dom = new \DOMDocument();
            $this->dom->preserveWhiteSpace = false;
            $this->dom->loadHTML($this->html, LIBXML_NOBLANKS | LIBXML_COMPACT | LIBXML_NOERROR);

            libxml_use_internal_errors(false);
        }

        $this->dom->registerNodeClass('DOMElement', 'Readability\JSLikeHTMLElement');
    }
747959
def _load_mapping(self, tag, ssh=False):
        """"""
        mappings = {}
        for mapping in tag:
            if mapping.tag == "map":
                mappings[mapping.attrib["module"]] = mapping.attrib["file"]

        if ssh == False:
            self._vardict["mappings"] = mappings
        else:
            self._vardict["ssh.mappings"] = mappings
1241694
private function loadTagContent(): ?string
    {
        $contents = [];
        $nextOrClosingPos = $this->file->findNext([T_DOC_COMMENT_CLOSE_TAG, T_DOC_COMMENT_TAG], $this->stackPos + 1);
        $positionsTillEnd = TokenHelper::findNextAll($this->file->getBaseFile(), [T_DOC_COMMENT_STRING], $this->stackPos, $nextOrClosingPos);

        foreach ($positionsTillEnd as $position) {
            $contents[] = $this->tokens[$position]['content'];
        }

        return $contents ? implode(' ', $contents) : null;
    }
1027791
def _get_all_tags(conn, load_balancer_names=None):
    '''
    
    '''
    params = {}
    if load_balancer_names:
        conn.build_list_params(params, load_balancer_names,
                               'LoadBalancerNames.member.%d')

    tags = conn.get_object(
        'DescribeTags',
        params,
        __utils__['boto_elb_tag.get_tag_descriptions'](),
        verb='POST'
    )
    if tags[load_balancer_names]:
        return tags[load_balancer_names]
    else:
        return None
989235
protected function loadExtensions()
    {
        if ($this->extensionsLoaded) {
            return;
        }
        foreach ($this->extensions as $extension) {
            foreach ($extension->getTags() as $tag) {
                if (!$tag instanceof TagInterface) {
                    throw new Html2PdfException('The ExtensionInterface::getTags() method must return an array of TagInterface.');
                }
                $this->addTagObject($tag);
            }
        }

        $this->extensionsLoaded = true;
    }
1309931
def tags(cls, filename, namespace=None):
        """"""
        return cls._raster_opener(filename).tags(ns=namespace)
1278967
def get_tag(self, name):
        """"""
        res = self.get_request('/tag/' + name)
        return Tag(cloud_manager=self, **res['tag'])
126229
private function loadProperties(&$tags, \DOMXPath $xpath, \DOMNode $context): array
    {
        $result = [];

        /** @var \DOMElement $node */
        foreach ($xpath->query('x:*', $context) as $node) {
            if ('property' === $node->tagName) {
                $value = $this->loadProperty($xpath, $node, $tags);
                $result[$value['name']] = $value;
            } elseif ('block' === $node->tagName) {
                $value = $this->loadBlock($xpath, $node, $tags);
                $result[$value['name']] = $value;
            } elseif ('section' === $node->tagName) {
                $value = $this->loadSection($xpath, $node, $tags);
                $result[$value['name']] = $value;
            }
        }

        return $result;
    }
761251
private function loadTags(&$tags, \DOMXPath $xpath, \DOMNode $context = null)
    {
        $result = [];

        /** @var \DOMElement $node */
        foreach ($xpath->query('x:tag', $context) as $node) {
            $tag = $this->loadTag($xpath, $node);
            $this->validateTag($tag, $tags);

            $result[] = $tag;
        }

        return $result;
    }
1246489
def load_tags(timeout)
      cmd = { :name => :get_tags }
      res = blocking_request(cmd, timeout)
      raise TagError.new("Retrieving current tags failed: #{res.inspect}") unless res.kind_of?(Array)

      ::Chef::Log.info("Successfully loaded current tags: '#{res.join("', '")}'")
      res
    end
772751
def convert_content(self) -> dict:
        """"""
        source_content = self.load_content()

        converted = {}

        tagged, content = self._get_tags_and_content(source_content)
        if tagged:
            converted.update(self._parse_tags(tagged))

        if content:
            converted['content'] = content.strip()
        return converted
170787
def render_tag(self, context, caller, **kwargs):
        ''''''
        # load configuration from passed options
        self.load_configuration(**kwargs)

        # get request from context
        request = context['request']

        # get full path from request
        self.full_path = request.get_full_path()

        # render content of extension
        content = caller()

        # check content for "active" urls
        content = render_content(
            content,
            full_path=self.full_path,
            parent_tag=self.parent_tag,
            css_class=self.css_class,
            menu=self.menu,
            ignore_params=self.ignore_params,
        )

        return content
214282
private function _parseTags($tags)
        {
            if(count($tags) > 0)
            {   
//              loop through the tags
                foreach($tags as $key=>$tag)
                {   
//                  if a tag is delayed, it is rendered after everything else and it's has to be re parsed.
                    if(isset($tag['attributes']) === true && isset($tag['attributes']->delayed) === true && $tag['attributes']->delayed === 'true')
                    {
                        continue;
                    }
//                  check for buried preserved tags, so they can be replaced.
//                  NOTE: this only works with no collected tags. Collected tags are a massive pain in the rectum.
                    if(($has_buried = preg_match_all('!------@@%([0-9\-]+)%@@------!', $tag['content'], $info)) > 0)
                    {   
                        $containers = $info[0];
                        $indexs = $info[1];
                        $replacements = array();
                        foreach ($indexs as $key2=>$index)
                        {
                            $index_parts = explode('-', $index);
                            $tag_index = array_pop($index_parts);
                            if(isset($tags[$tag_index]['parsed']) === true)
                            {
                                $replacements[$key2] = $tags[$tag_index]['parsed'];
                            }
                            else
                            {   
                                if(isset($tags[$tag_index]['block']) === true)
                                {
                                    $block = preg_replace('/ delayed="true"/', '', $tags[$tag_index]['block'], 1);
                                    if(isset($tag['block']) === true)
                                    {
                                        $tag['block'] = str_replace($containers[$key2], $block, $tag['block']); 
                                    }
                                    $tag['content'] = str_replace($containers[$key2], $block, $tag['content']); 
                                }
                            }
                        }
                        $tags[$key]['buried_source_markers'] = $tag['buried_source_markers'] = $containers;
                    }

//                  if the tag is a nocahe tag then the block must be replaced as is for later processing
                    if($tag['name'] === 'nocache')
                    {
                        array_push(self::$nocache_tags, $tag);
                        $tags[$key]['parsed'] = $tag['source_marker'];
//                      $tags[$key]['parsed'] = $tag['block'];
                    }
//                  if the tag is just plain text then just shove the content back into the parsed as it doesn't require processing
                    else if($tag['name'] === '___text')
                    {
                        $tags[$key]['parsed'] = $tag['content'];
                    }
//                  otherwise we have a tag and must post process
                    else
                    {   
                        $tags[$key]['parsed'] = $this->_parseTag($tag);
                    }
//                  update any buried tags within the parsed content
                    $tags[$key]['parsed'] = $has_buried > 0 ? str_replace($containers, $replacements, $tags[$key]['parsed']) : $tags[$key]['parsed'];
                }
// //              if there are items within the nocache elements, parse the contents to pull them out
//                 $tagname = $this->_options['tag_name'];
//                 if(substr_count($tags[$key]['parsed'], self::$tag_open.$tagname.':') > substr_count($tags[$key]['parsed'], self::$tag_open.$tagname.':nocache'))
//                 {
//                     $tags[$key]['parsed'] = $this->parse($tags[$key]['parsed'], true, true);
// //                  $tags[$key]['parsed'] = $this->_processTags($tags[$key]['parsed'], true);
//                 }
                
//                 Debug::info($tags[$key]);
                
                return $tags[$key]['parsed'];
            }
            return false;
        }