Return an array of the text content (in lowercase) of all items. Cache these results.
191371
function getItemTextContents(element) {
  if (!element[itemTextContentsSymbol]) {
    const items = element.items;
    element[itemTextContentsSymbol] = items.map(child => {
      const text = child.textContent || child.alt;
      return text.toLowerCase();
    });
  }
  return element[itemTextContentsSymbol];
}
348069
def get_all(self, cat):
        
        return self._get_from_local_cache(cat) or self._get_from_cache(cat) or self._get_from_db(cat)
69403
def content_children(self):
        
        text_types = {CT_RegularTextRun, CT_TextLineBreak, CT_TextField}
        return tuple(elm for elm in self if type(elm) in text_types)
993874
def _GetContents(self):
        """"""
        try:
            self._RealGetContents()
        except BadZipfile:
            if not self._filePassed:
                self.fp.close()
                self.fp = None
            raise
715822
def get_all_items(self):
        """"""
        for item in os.walk(self.test_case_dir):
            if "workitem.xml" not in item[2]:
                continue
            case_id = os.path.split(item[0])[-1]
            if not (case_id and "*" not in case_id):
                continue
            item_cache = self[case_id]
            if not item_cache:
                continue
            if not item_cache.get("title"):
                continue
            yield item_cache
194972
def get_content(pattern, string, tag='content'):
    
    output = []
    for match in re.finditer(pattern, string):
        output.append(match.group(tag))
    return output
200362
def array_from_text(self, msg):
        """"""
        rows, columns = self.t.height, self.t.width
        return self.array_from_text_rc(msg, rows, columns)
887806
private function getCachedContent()
    {
        $item = null;

        if (null !== $this->cache) {
            $item = $this->cache->getItem($this->cacheKey);
            $cacheContent = $item->get();

            if ($item->isHit() && null !== $cacheContent) {
                $this->contentCache = $cacheContent;
            }
        }

        return $item;
    }
80782
def _content_function(self):
        
        # ensure that active is valid
        self.active = self.active % len(self.items)

        return set([self.items[self.active]])
1144821
def case_sensitive(self, lst):
        
        dictionary = {}
        for pkg in lst:
            dictionary[pkg.lower()] = pkg
        return dictionary
995132
def _get_text(self):
        
        boxes = self.boxes
        txt = []
        for line in boxes:
            txt_line = u""
            for box in line.word_boxes:
                txt_line += u" " + box.content
            txt.append(txt_line)
        return txt
943416
def text(self):
        """"""
        texts = []
        for child in self.childs:
            if isinstance(child, Tag):
                texts.append(child.text())
            elif isinstance(child, Content):
                texts.append(child.render())
            else:
                texts.append(child)
        return " ".join(texts)
1183012
def contents(self):
        """"""
        if not IS_PY2 and isinstance(self.byte_contents, bytes):
            return self.byte_contents.decode(
                self.encoding or locale.getpreferredencoding(False),
                errors=self.errors)
        return self.byte_contents
337253
def get_collated_content(ident_hash, context_ident_hash, cursor):
    """"""
    cursor.execute(SQL['get-collated-content'],
                   (ident_hash, context_ident_hash,))
    try:
        return cursor.fetchone()[0]
    except TypeError:  # NoneType
        return
1053691
def _try_decode_list(content):
        
        result = list()
        for value in content:
            result.append(try_utf8_decode(value))
        return result
475174
def get_clean_content(self):
        """"""
        fill_chars = {'BLANK_TEMPLATE': ' ', 'ECHO_TEMPLATE': '0'}
        for match in self.pattern.finditer(self.html_content):
            start, end = match.start(), match.end()
            tag = _get_tag(match)
            if tag == 'ECHO':
                self._write_content(start)
                self._index = start
                self._state = 'ECHO_TEMPLATE'
            elif tag == 'START':
                if self._index != start:
                    self._write_content(start)
                self._index = start
                self._state = 'BLANK_TEMPLATE'
            elif tag == 'END':
                if self._state not in ('BLANK_TEMPLATE', 'ECHO_TEMPLATE'):
                    # We got a closing tag but none was open. We decide to carry
                    # on as it may be the case that it was because of a closing
                    # dictionary in javascript like: var dict = {foo:{}}.
                    # See the note on the clean() function for more details.
                    continue
                fill_char = fill_chars[self._state]
                fill = fill_char * (end - self._index)
                if self._state == 'BLANK_TEMPLATE':
                    self._pending.append(fill)
                    self._pending_has_blank = True
                else:
                    assert not self._pending
                    self._output.write(fill)
                self._index = end
                self._state = 'HTML'
            elif tag == 'SPACES':
                self._pending.append(match.group('spaces'))
                self._index = end
            elif tag == 'NEWLINE':
                if self._state == 'HTML':
                    if self._index != start or not self._pending_has_blank:
                        self._write_content(start)
                    self._output.write(match.group('newline'))
                elif self._state == 'BLANK_TEMPLATE':
                    # We discard the content of this template and whatever is in
                    # self._pending.
                    self._output.write(match.group('newline'))
                elif self._state == 'ECHO_TEMPLATE':
                    assert False, 'Echo tags should be in just one line.'
                self._index = end
                self._reset_pending()

        assert self._state == 'HTML', 'Tag was not closed'
        if self._index != len(self.html_content) or not self._pending_has_blank:
            self._write_content()

        return self._output.getvalue()
829731
public function getContents()
    {
        if ($this->contents) {
            if ($this->contents[0]->getType() !== 'text/plain'
            && count($this->contents) > 1
            ) {
                foreach ($this->contents as $key => $value) {
                    if ($value->getType() == 'text/plain') {
                        $plain_content = $value;
                        unset($this->contents[$key]);
                        break;
                    }
                }
                array_unshift($this->contents, $plain_content);
            }
        }

        return $this->contents;
    }