Lines Matching refs:this

31     $this->preview = $preview;
32 if(!$this->preview) // Not javascript preview
36 $this->dir = dirname(__FILE__) . "/";
39 $this->dir = $dir;
41 $this->dir .= "/";
44 $this->bibtexParsePath = $this->dir . "format/bibtexParse";
47 $this->dir = '';
48 $this->bibtex = $bibtex;
49 if($this->bibtex)
51 include_once($this->dir."STYLEMAPBIBTEX.php");
52 $this->styleMap = new STYLEMAPBIBTEX();
56 include_once($this->dir."STYLEMAP.php");
57 $this->styleMap = new STYLEMAP();
59 include_once($this->dir."UTF8.php");
60 $this->utf8 = new UTF8();
64 $this->patterns = FALSE;
65 $this->patternHighlight = FALSE;
70 $this->output = 'html';
71 $this->previousCreator = '';
75 $this->editorSwitch = FALSE;
79 $this->loadArrays();
84 $this->convertEntry=FALSE;
108 include_once($this->dir."PARSEXML.php");
109 $parseXML = new PARSEXML($this);
125 $this->commonToArray($common);
126 $this->typesToArray($types);
144 $this->style[$array['_NAME']] = $array['_DATA'];
168 $this->fallback[$type] = $array['_DATA'];
173 $this->{$type}['ultimate'] = $array['_DATA'];
181 $this->{$type}[$array['_NAME']][$split[1]]
185 $this->{$type}[$array['_NAME']][$elements['_NAME']]
194 if(isset($this->$type))
195 $this->backup[$type] = $this->$type;
206 foreach($this->backup as $type => $array)
207 $this->$type = $array;
224 $this->item = array();
226 $this->type = array_search($type, $this->styleMap->types);
227 if($this->bibtex && array_key_exists('author', $row))
232 if($this->bibtex && array_key_exists('editor', $row))
240 if(!$this->preview && (($type == 'book') || ($type == 'book_article')) &&
241 $row['creator2'] && !$row['creator1'] && $this->style['editorSwitch'] &&
242 array_key_exists('author', $this->$type))
246 include_once($this->dir . "PARSESTYLE.php");
247 $editorArray = PARSESTYLE::parseStringToArray($type, $this->style['editorSwitchIfYes'],
248 $this->styleMap);
251 $this->{$type}['author'] = $editorArray['editor'];
252 unset($this->{$type}['editor']);
253 $this->editorSwitch = TRUE;
259 if($this->bibtex)
261 if(!$this->type)
263 list($type, $row) = $this->preProcessBibtex($row, $type);
265 list($type, $row) = $this->preProcessBibtex($row, $this->type);
272 if(($key = array_search('type', $this->styleMap->$type)) !== FALSE)
277 if(($key = array_search('label', $this->styleMap->$type)) !== FALSE)
288 if(!isset($this->$type))
290 $fallback = $this->fallback[$type];
293 $this->type = $type;
297 if($this->bibtex)
301 if(array_key_exists($field, $this->styleMap->$type) &&
302 !array_key_exists($this->styleMap->{$type}[$field], $this->item))
303 $this->addItem($row[$field], $field);
325 include_once($this->bibtexParsePath . "/PARSECREATORS.php");
327 include_once($this->bibtexParsePath . "/PARSEMONTH.php");
329 include_once($this->bibtexParsePath . "/PARSEPAGE.php");
345 if ($this->cleanEntry) {$row=$this->convertEntry($row);}
353 if(!$this->type)
379 if(array_key_exists('month', $row) && array_key_exists('date', $this->styleMap->$type))
386 $this->formatDate($startDay, $startMonth, $endDay, $endMonth);
402 $this->type = $type;
404 array_key_exists('creator1', $this->styleMap->$type))
416 $this->formatNames($temp, 'creator1');
420 array_key_exists('creator2', $this->styleMap->$type))
432 $this->formatNames($temp, 'creator2');
434 if(array_key_exists('pages', $row) && array_key_exists('pages', $this->styleMap->$type))
437 $this->formatPages(trim($start), trim($end));
439 $this->formatTitle($row['title'], "{", "}");
458 include_once($this->dir . "format/EXPORTFILTER.php");
459 $this->export = new EXPORTFILTER($this, $this->output);
462 $this->citation = $template;
463 $this->type = 'citation';
465 $type = $this->type;
469 if(array_key_exists('independent', $this->$type))
470 $independent = $this->{$type}['independent'];
475 $checkPost = array_keys($this->$type);
477 foreach($this->$type as $key => $value)
484 if(!array_key_exists($key, $this->item) || !$this->item[$key])
493 if(!array_key_exists($checkPostShift, $this->item) || !$this->item[$checkPostShift])
519 */ if($styleKey = array_search($key, $this->styleMap->$type))
521 if(isset($this->$pluralKey) && $this->$pluralKey) // plural alternative for this key
528 else if(isset($this->$pluralKey)) // singular alternative for this key
538 $firstItem = substr($this->item[$key], 0, 1);
540 $this->item[$key] = substr($this->item[$key], 1);
542 $lastItem = substr($this->item[$key], -1);
551 $pre = ($this->output == 'html') ? $this->utf8->utf8_htmlspecialchars($pre) : $pre;
552 $post = ($this->output == 'html') ? $this->utf8->utf8_htmlspecialchars($post) : $post;
553 if($this->item[$key])
554 $itemArray[$index] = $pre . $this->item[$key] . $post;
641 if($this->editorSwitch)
643 $this->restoreTypes();
644 $this->editorSwitch = FALSE;
646 return $this->export->format(trim($pString) . $ultimate);
667 $style = $citation ? $citation : $this->style;
673 $this->$pluralKey = FALSE;
736 $type = $this->type;
739 $firstName = trim($this->checkInitials($creator, $style[$initialsStyle],
770 $nameString = $this->utf8->utf8_strtoupper($nameString);
811 $this->$pluralKey = TRUE;
826 if(($style['primaryCreatorRepeat'] == 2) && ($this->previousCreator == $pString))
829 ($this->previousCreator == $pString))
831 $this->previousCreator = $tempString;
835 $this->item[$this->styleMap->{$type}[$nameType]] = $pString;
879 … $firstNameInitialMake .= $this->utf8->utf8_strtoupper($this->utf8->utf8_substr($nameparts, 0, 1));
884 $initials[] = $this->utf8->utf8_strtoupper($this->utf8->utf8_substr(trim($name), 0, 1));
953 $type = $this->type;
959 if(isset($this->item) && array_key_exists($this->styleMap->{$type}[$fieldName], $this->item))
961 $this->item[$this->styleMap->{$type}[$fieldName]] = $item;
973 $type = $this->type;
976 if(array_key_exists($field, $this->styleMap->$type) &&
977 !array_key_exists($this->styleMap->{$type}[$field], $this->item))
978 $this->addItem($row[$field], $field);
1001 $type = $this->type;
1002 if(!array_key_exists('title', $this->styleMap->$type))
1003 $this->item[$this->styleMap->{$type}['title']] = '';
1008 if($this->style['titleCapitalization'])
1014 $pString = $this->utf8->decodeUtf8($pString);
1025 $newString .= $this->utf8->utf8_strtolower($this->utf8->encodeUtf8($array[1])) . $array[2];
1028 $newString .= $this->utf8->utf8_strtolower($this->utf8->encodeUtf8($pString));
1031 $title = $this->utf8->encodeUtf8($this->utf8->utf8_ucfirst(trim($pString)));
1032 $this->item[$this->styleMap->{$type}['title']] =
1033 ($this->output == 'html') ? $this->utf8->utf8_htmlspecialchars($title) : $title;
1052 $type = $this->type;
1053 $style = $citation ? $citation : $this->style;
1057 $this->pages_plural = FALSE;
1063 $this->item[$this->styleMap->{$type}['pages']] = $start;
1071 $this->item[$this->styleMap->{$type}['pages']] = $start . '-' . $end;
1077 $this->pages_plural = TRUE;
1083 $this->item[$this->styleMap->{$type}['pages']] = $start . '-' . $end;
1088 $this->item[$this->styleMap->{$type}['pages']] = $start . '-' . $end;
1120 $this->item[$this->styleMap->{$type}['pages']]
1130 $this->item[$this->styleMap->{$type}['pages']] = $start . '-' . $end;
1137 $this->item[$this->styleMap->{$type}['pages']] = $start . '-' . $end;
1150 $type = $this->type;
1151 if($this->style['runningTimeFormat'] == 0) // 3'45"
1162 else if($this->style['runningTimeFormat'] == 1) // 3:45
1173 else if($this->style['runningTimeFormat'] == 1) // 3,45
1184 else if($this->style['runningTimeFormat'] == 3) // 3 hours, 45 minutes
1195 else if($this->style['runningTimeFormat'] == 4) // 3 hours and 45 minutes
1206 $this->item[$this->styleMap->{$type}['runningTime']] = $runningTime;
1221 $type = $this->type;
1224 if($this->style['dayFormat']) // e.g. 10th
1225 $startDay = $this->cardinalToOrdinal($startDay);
1231 if($this->style['dayFormat']) // e.g. 10th
1232 $endDay = $this->cardinalToOrdinal($endDay);
1236 if($this->style['monthFormat'] == 1) // Full month name
1237 $monthArray = $this->longMonth;
1238 else if($this->style['monthFormat'] == 2) // User-defined
1241 $monthArray[$i] = $this->style["userMonth_$i"];
1244 $monthArray = $this->shortMonth;
1251 if($this->style['dateFormat']) // Order == Month Day
1265 $delimit = $this->style['dateRangeDelimit2'];
1267 $delimit = $this->style['dateRangeDelimit1'];
1268 …if(($endMonth !== FALSE) && ($startMonth == $endMonth) && ($this->style['dateRangeSameMonth'] == 1…
1274 if($this->style['dateFormat']) // Order == Month Day
1300 $this->item[$this->styleMap->{$type}['date']] = $date;
1313 $type = $this->type;
1315 … $edition = ($this->output == 'html') ? $this->utf8->utf8_htmlspecialchars($edition) : $edition;
1316 else if($this->style['editionFormat']) // 10th
1317 …$edition = ($this->output == 'html') ? $this->utf8->utf8_htmlspecialchars($this->cardinalToOrdinal…
1318 : $this->cardinalToOrdinal($edition);
1319 … $this->item[$this->styleMap->{$type}[array_search('edition', $this->styleMap->$type)]] = $edition;
1352 $this->longMonth = array(
1366 $this->shortMonth = array(
1395 $this->config = new BIBTEXCONFIG();
1396 $this->config->bibtex();
1399 foreach($this->config->bibtexSpCh as $key => $value)
1404 foreach($this->config->bibtexSpChOld as $key => $value)
1409 foreach($this->config->bibtexSpChOld2 as $key => $value)
1414 foreach($this->config->bibtexSpChLatex as $key => $value)
1424 $value= $this->utf8->smartUtf8_decode($value);
1448 $this->bibtexSpCh = array(
1522 $this->bibtexSpChOld = array(
1585 $this->bibtexSpChOld2 = array(
1648 $this->bibtexSpChLatex = array(
1710 $this->bibtexSpChPlain = array(