BibtexItem.php
Go to the documentation of this file.
00001 <?php 00002 00005 00026 class BibtexItem 00027 { 00028 public $itemType = ""; // The Bibtex entry type. 00029 public $itemID = ""; // The Bibtex entry ID. 00030 00031 /* 00032 public $address = ""; // Publisher's address (usually just the city, but can be the full address for lesser-known publishers) 00033 public $annote = ""; // An annotation for annotated bibliography styles (not typical) 00034 public $author = ""; // The name(s) of the author(s) (in the case of more than one author, separated by and) 00035 public $booktitle = ""; // The title of the book, if only part of it is being cited 00036 public $chapter = ""; // The chapter number 00037 public $crossref = ""; // The key of the cross-referenced entry 00038 public $edition = ""; // The edition of a book, long form (such as "first" or "second") 00039 public $editor = ""; // The name(s) of the editor(s) 00040 public $eprint = ""; // A specification of an electronic publication, often a preprint or a technical report 00041 public $howpublished = ""; // How it was published, if the publishing method is nonstandard 00042 public $institution = ""; // The institution that was involved in the publishing, but not necessarily the publisher 00043 public $journal = ""; // The journal or magazine the work was published in 00044 public $key = ""; // A hidden field used for specifying or overriding the alphabetical order of entries (when the "author" and "editor" fields are missing). Note that this is very different from the key (mentioned just after this list) that is used to cite or cross-reference the entry. 00045 public $month = ""; // The month of publication (or, if unpublished, the month of creation) 00046 public $note = ""; // Miscellaneous extra information 00047 public $number = ""; // The "number" of a journal, magazine, or tech-report, if applicable. (Most publications have a "volume", but no "number" field.) 00048 public $organization = ""; // The conference sponsor 00049 public $pages = ""; // Page numbers, separated either by commas or double-hyphens. For books, the total number of pages. 00050 public $publisher = ""; // The publisher's name 00051 public $school = ""; // The school where the thesis was written 00052 public $series = ""; // The series of books the book was published in (e.g. "The Hardy Boys" or "Lecture Notes in Computer Science") 00053 public $title = ""; // The title of the work 00054 public $type = ""; // The type of tech-report, for example, "Research Note" 00055 public $url = ""; // The WWW address 00056 public $volume = ""; // The volume of a journal or multi-volume book 00057 public $year = ""; // The year of publication (or, if unpublished, the year of creation) 00058 */ 00059 public $properties = array(); 00060 00061 function __construct() { } 00062 00063 function __destruct() { } 00064 00065 public function addType($type) { $this->itemType = $type; } 00066 00067 public function addID($id) { $this->itemID = $id; } 00068 00069 public function addProperty($property, $value) { $this->properties[$property] = $value; 00070 00071 /* 00072 switch($property) 00073 { 00074 case "address": 00075 $this->address = $value; 00076 break; 00077 00078 case "annote": 00079 $this->annote = $value; 00080 break; 00081 00082 case "author": 00083 $this->author = $value; 00084 break; 00085 00086 case "booktitle": 00087 $this->booktitle = $value; 00088 break; 00089 00090 case "chapter": 00091 $this->chapter = $value; 00092 break; 00093 00094 case "crossref": 00095 $this->crossref = $value; 00096 break; 00097 00098 case "edition": 00099 $this->edition = $value; 00100 break; 00101 00102 case "editor": 00103 $this->editor = $value; 00104 break; 00105 00106 case "eprint": 00107 $this->eprint = $value; 00108 break; 00109 00110 case "howpublished": 00111 $this->howpublished = $value; 00112 break; 00113 00114 case "institution": 00115 $this->institution = $value; 00116 break; 00117 00118 case "journal": 00119 $this->journal = $value; 00120 break; 00121 00122 case "key": 00123 $this->key = $value; 00124 break; 00125 00126 case "month": 00127 $this->month = $value; 00128 break; 00129 00130 case "note": 00131 $this->note = $value; 00132 break; 00133 00134 case "number": 00135 $this->number = $value; 00136 break; 00137 00138 case "organization": 00139 $this->organization = $value; 00140 break; 00141 00142 case "pages": 00143 $this->pages = $value; 00144 break; 00145 00146 case "publisher": 00147 $this->publisher = $value; 00148 break; 00149 00150 case "school": 00151 $this->school = $value; 00152 break; 00153 00154 case "series": 00155 $this->series = $value; 00156 break; 00157 00158 case "title": 00159 $this->title = $value; 00160 break; 00161 00162 case "type": 00163 $this->type = $value; 00164 break; 00165 00166 case "url": 00167 $this->url = $value; 00168 break; 00169 00170 case "volume": 00171 $this->volume = $value; 00172 break; 00173 00174 case "year": 00175 $this->year = $value; 00176 break; 00177 00178 default: 00179 break; 00180 } 00181 */ 00182 } 00183 } 00184 00186 00187 ?>
