<commit_before><?php

class CM_RenderAdapter_Page extends CM_RenderAdapter_Component {

    public function fetch(array $params = array()) {
        $this->_getView()->setTplParam('pageTitle', $this->fetchTitle());

        return parent::fetch($params);
    }

    /**
     * @return string
     */
    public function fetchDescription() {
        return $this->_fetchTpl('meta-description.tpl');
    }

    /**
     * @return string
     */
    public function fetchKeywords() {
        return $this->_fetchTpl('meta-keywords.tpl');
    }

    /**
     * @return string
     */
    public function fetchTitle() {
        return trim($this->_fetchTpl('title.tpl'));
    }

    protected function _getStackKey() {
        return 'pages';
    }

    /**
     * @param string $tplName
     * @return string
     */
    private function _fetchTpl($tplName) {
        return $this->_renderTemplate($tplName, $this->_getView()->getTplParams());
    }
}
<commit_msg>search templates accross all namespaces when fetching meta-keywords and meta-description<commit_after><?php

class CM_RenderAdapter_Page extends CM_RenderAdapter_Component {

    public function fetch(array $params = array()) {
        $this->_getView()->setTplParam('pageTitle', $this->fetchTitle());

        return parent::fetch($params);
    }

    /**
     * @return string
     */
    public function fetchDescription() {
        return $this->_fetchTpl('meta-description.tpl', true);
    }

    /**
     * @return string
     */
    public function fetchKeywords() {
        return $this->_fetchTpl('meta-keywords.tpl', true);
    }

    /**
     * @return string
     */
    public function fetchTitle() {
        return trim($this->_fetchTpl('title.tpl'));
    }

    protected function _getStackKey() {
        return 'pages';
    }

    /**
     * @param string       $tplName
     * @param boolean|null $searchAllNamespaces
     * @return string
     */
    private function _fetchTpl($tplName, $searchAllNamespaces = null) {
        return $this->_renderTemplate($tplName, $this->_getView()->getTplParams(), null, $searchAllNamespaces);
    }
}

{'fraction_non_alphanumeric': 0.14069877242681775, 'fraction_numerical': 0.0, 'mean_word_length': 2.640893470790378, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '908031', 'n_tokens_mistral': 612, 'n_tokens_neox': 608, 'n_words': 120}