/** * Extracting the data of one entry * * @access private * @param string $entry The entry * @return array The representation of the entry or false if there is a problem */ static function _postProcessing(&$ret) { // Process accents foreach ($ret as $key => &$value) { if ($key != "entrytype" && $key != "bibtex" && $key != "cite") { BibTexEntries::process_accents($value); } } // Remove braces and handles capitalization foreach (array("title", "booktitle") as $f) { if (in_array($f, array_keys($ret))) { $ret[$f] = BibTexEntries::formatTitle($ret[$f]); } } // Handling pages if (in_array('pages', array_keys($ret))) { $matches = array(); if (preg_match("/^\\s*(\\d+)(?:\\s*--?\\s*(\\d+))?\\s*\$/", $ret['pages'], $matches)) { $ret['pages'] = new BibtexPages($matches[1], $matches[2]); } } //Handling the authors if (in_array('author', array_keys($ret))) { $ret['author'] = BibTexEntries::_extractAuthors($ret['author']); } //Handling the editors if (in_array('editor', array_keys($ret))) { $ret['editor'] = BibTexEntries::_extractAuthors($ret['editor']); } }
/** * Extracting the data of one content * * @access private * @param string $entry The entry * @return array The representation of the entry or false if there is a problem */ static function _postProcessing(&$ret) { // Process accents foreach($ret as $key => &$value) if ($key != "bibtex" && $key != "cite") BibTexEntries::process_accents($value); // Handling pages if (in_array('pages', array_keys($ret))) { $matches = array(); if (preg_match("/^\s*(\d+)(?:\s*--?\s*(\d+))?\s*$/", $ret['pages'], $matches)) { $ret['pages'] = new BibtexPages($matches[1], $matches[2]); } } //Handling the authors if (in_array('author', array_keys($ret))) { $ret['author'] = BibTexEntries::_extractAuthors($ret['author']); } //Handling the editors if (in_array('editor', array_keys($ret))) { $ret['editor'] = BibTexEntries::_extractAuthors($ret['editor']); } }