Lines Matching refs:entry

279         $entry          = false;
294 $entry = true;
295 …} elseif ($entry && ('{' == $char) && ('\\' != $lastchar)) { //Inside an entry and non quoted brac…
297 …} elseif ($entry && ('}' == $char) && ('\\' != $lastchar)) { //Inside an entry and non quoted brac…
303 $entry = false;
318 if ($entry) { //Inside entry
341 foreach ($this->data as $entry) {
342 $cites[] = $entry['cite'];
380 * @param string $entry The entry
383 function _parseEntry($entry) argument
387 $entrycopy = $entry; //We need a copy for printing the warnings
389 $ret = array('bibtex' => $entry.'}');
390 if ('@string' == strtolower(substr($entry, 0, 7))) {
393 $this->_generateWarning('STRING_ENTRY_NOT_YET_SUPPORTED', '', $entry.'}');
395 } elseif ('@preamble' == strtolower(substr($entry, 0, 9))) {
398 $this->_generateWarning('PREAMBLE_ENTRY_NOT_YET_SUPPORTED', '', $entry.'}');
403 preg_match('/^@\w+\{(.+?),/' ,$entry, $matches);
410 while (strrpos($entry,'=') !== false) {
411 $position = strrpos($entry, '=');
414 if (substr($entry, $position-1, 1) == '\\') {
418 $proceed = $this->_checkEqualSign($entry, $position);
421 $substring = substr($entry, 0, $position);
424 if (substr($entry, $position-1, 1) == '\\') {
428 $proceed = $this->_checkEqualSign($entry, $position);
432 $value = trim(substr($entry, $position+1));
433 $entry = substr($entry, 0, $position);
450 $position = strrpos($entry, ',');
451 $field = strtolower(trim(substr($entry, $position+1)));
453 $entry = substr($entry, 0, $position);
456 $arr = explode('{', $entry);
464 … $this->_generateWarning('WARNING_NOT_ALLOWED_ENTRY_TYPE', $ret['entrytype'], $entry.'}');
485 * @param string $entry The text of the whole remaining entry
489 function _checkEqualSign($entry, $position) argument
495 $length = strlen($entry);
498 $precedingchar = substr($entry, $i-1, 1);
499 $char = substr($entry, $i, 1);
513 $entrycopy = trim($entry);
525 $precedingchar = substr($entry, $i-1, 1);
526 $char = substr($entry, $i, 1);
544 * @param string $entry The entry to check
547 function _checkAllowedEntryType($entry) argument
549 return in_array($entry, $this->allowedEntryTypes);
560 * @param string $entry The text of the entry until the at
563 function _checkAt($entry) argument
569 if (strrpos($entry,'=') !== false) {
570 $position = strrpos($entry, '=');
572 if (substr($entry, $position-1, 1) == '\\') {
576 $substring = substr($entry, 0, $position);
579 if (substr($entry, $position-1, 1) == '\\') {
583 $value = trim(substr($entry, $position+1));
608 * @param string $entry The entry where the Delimiter should be stripped from
611 function _stripDelimiter($entry) argument
614 $length = strlen($entry);
615 $firstchar = substr($entry, 0, 1);
616 $lastchar = substr($entry, -1, 1);
619 $entry = substr($entry, 1, -1);
623 $firstchar = substr($entry, 0, 1);
624 $lastchar = substr($entry, -1, 1);
626 return $entry;
633 * @param string $entry The entry to unwrap
636 function _unwrap($entry) argument
638 $entry = preg_replace('/\s+/', ' ', $entry);
639 return trim($entry);
646 * @param string $entry The entry to wrap
649 function _wordwrap($entry) argument
651 if ( (''!=$entry) && (is_string($entry)) ) {
652 …$entry = wordwrap($entry, $this->_options['wordWrapWidth'], $this->_options['wordWrapBreak'], $thi…
654 return $entry;
661 * @param string $entry The entry with the authors
664 function _extractAuthors($entry) { argument
665 $entry = $this->_unwrap($entry);
667 $authorarray = explode(' and ', $entry);
842 * @param string $entry The entry aka one line which which should be validated
846 function _validateValue($entry, $wholeentry) argument
849 if (preg_match('/^{.*@.*}$/', $entry)) {
850 $this->_generateWarning('WARNING_AT_IN_BRACES', $entry, $wholeentry);
853 if (preg_match('/^\".*\\".*\"$/', $entry)) {
854 … $this->_generateWarning('WARNING_ESCAPED_DOUBLE_QUOTE_INSIDE_DOUBLE_QUOTES', $entry, $wholeentry);
860 for ($i = 0; $i < strlen($entry); $i++) {
861 $char = substr($entry, $i, 1);
871 $this->_generateWarning('WARNING_UNBALANCED_AMOUNT_OF_BRACES', $entry, $wholeentry);
913 * @param string $entry The line of the entry where the warning occurred
916 function _generateWarning($type, $entry, $wholeentry='') argument
919 $warning['entry'] = $entry;
1007 foreach ($this->data as $entry) {
1009 $bibtex .= '@'.strtolower($entry['entrytype']).' { '.$entry['cite'].",\n";
1011 foreach ($entry as $key=>$val) {
1020 if (array_key_exists('author', $entry)) {
1023 foreach ($entry['author'] as $authorentry) {
1028 $author = $entry['author'];
1063 foreach ($this->data as $entry) {
1064 if (array_key_exists($entry['entrytype'], $ret)) {
1065 $ret[$entry['entrytype']]++;
1067 $ret[$entry['entrytype']] = 1;
1090 foreach ($this->data as $entry) {
1096 if (array_key_exists('title', $entry)) {
1097 $title = $this->_unwrap($entry['title']);
1099 if (array_key_exists('journal', $entry)) {
1100 $journal = $this->_unwrap($entry['journal']);
1102 if (array_key_exists('year', $entry)) {
1103 $year = $this->_unwrap($entry['year']);
1105 if (array_key_exists('author', $entry)) {
1108 foreach ($entry['author'] as $authorentry) {
1113 $authors = $entry['author'];
1124 $this->_generateWarning('WARNING_LINE_WAS_NOT_CONVERTED', '', print_r($entry,1));
1147 foreach ($this->data as $entry) {
1153 if (array_key_exists('title', $entry)) {
1154 $title = $this->_unwrap($entry['title']);
1156 if (array_key_exists('journal', $entry)) {
1157 $journal = $this->_unwrap($entry['journal']);
1159 if (array_key_exists('year', $entry)) {
1160 $year = $this->_unwrap($entry['year']);
1162 if (array_key_exists('author', $entry)) {
1165 foreach ($entry['author'] as $authorentry) {
1170 $authors = $entry['author'];
1181 $this->_generateWarning('WARNING_LINE_WAS_NOT_CONVERTED', '', print_r($entry,1));