<commit_before><?php

class DeclarationExportView extends acCouchdbView
{
    const KEY_TYPE = 0;
    const KEY_CAMPAGNE = 1;
    const KEY_IDENTIFIANT = 2;

    public static function getInstance() {

        return acCouchdbManager::getView('declaration', 'export', 'Declaration');
    }

}<commit_msg>fonction pour interroger la vue declaration/export par type<commit_after><?php

class DeclarationExportView extends acCouchdbView
{
    const KEY_TYPE = 0;
    const KEY_CAMPAGNE = 1;
    const KEY_IDENTIFIANT = 2;

    public static function getInstance() {

        return acCouchdbManager::getView('declaration', 'export');
    }

    public function getDeclarations($type, $campagne = null) {
      $keys = ($campagne)? array($type, $campagne) : array($type);
      return $this->client
            ->startkey($keys)
            ->endkey(array_merge($keys, array(array())))
            ->reduce(false)
            ->getView($this->design, $this->view);
    }

}
{'fraction_non_alphanumeric': 0.1217750257997936, 'fraction_numerical': 0.006191950464396285, 'mean_word_length': 3.2731277533039647, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, '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': '3877038', 'n_tokens_mistral': 303, 'n_tokens_neox': 292, 'n_words': 68}