represents a bibliographic entry. usage: $db = zetDB('bibacid-utf8.bib'); $entry = $db->getEntryByKey('classical'); echo bib2html($entry); notes: - BibEntry are usually obtained with getEntryByKey or multisearch

__toString() returns a debug string representation

__construct() Creates an empty new bib entry. Each bib entry is assigned a unique identification number.

setFile($filename) Sets the name of the file containing this entry

timestamp() Adds timestamp to this object

getTimestamp() Returns the timestamp of this object

getType() Returns the type of this bib entry.

setKey($value) Sets the key of this bib entry.

removeField($name) removes a field from this bibtex entry

setField($name, $value) Sets a field of this bib entry.

setType($value) Sets a type of this bib entry.

getURL() Tries to build a good URL for this entry. The URL should be absolute (better for the generated RSS)

bib2links() @see bib2links(), kept for backward compatibility

getLink($bibfield, $iconurl, $altlabel) Read the bibtex field $bibfield and return a link with icon (if $iconurl is given) or text e.g. given the bibtex entry: @article{myarticle, pdf={myarticle.pdf}}, $bibtexentry->getLink('pdf') creates a link to myarticle.pdf using the text '[pdf]'. $bibtexentry->getLink('pdf','pdficon.png') returns <a href="myarticle.pdf"><img src="pdficon.png"/></a> if you want a label that is different from the bibtex field, add a third parameter.

getBibLink($iconurl) returns a "[bib]" link

getPdfLink($iconurl, $label) kept for backward compatibility

getUrlLink($iconurl) returns a "[pdf]" link for the entry, if possible. Tries to get the target URL from the 'pdf' field first, then from 'url' or 'file'. Performs a sanity check that the file extension is 'pdf' or 'ps' and uses that as link label. Otherwise (and if no explicit $label is set) the field name is used instead.

getAndRenameLink($bibfield, $iconurl) See description of 'getUrlLink'

getDoiLink($iconurl) DOI are a special kind of links, where the url depends on the doi

getGSLink($iconurl) GS (Google Scholar) are a special kind of links, where the url depends on the google scholar id

getIconOrTxt($txt, $iconurl) replace [$ext] with an icon whose url is defined in a string e.g. getIconOrTxt('pdf') will print '[pdf]' or getIconOrTxt('pdf','http://link/to/icon.png') will use the icon linked by the url, or print '[pdf'] if the url does not point to a valid file (using the "alt" property of the "img" html tag)

getAbstract() Reruns the abstract

getLastName($author) Returns the last name of an author name.

getFirstName($author) Returns the first name of an author name.

hasField($name) Has this entry the given field?

getAuthor() Returns the authors of this entry. If "author" is not given, return a string 'Unknown'.

getKey() Returns the key of this entry

getTitle() Returns the title of this entry?

getPublisher() Returns the publisher of this entry It encodes a specific logic

getRawAuthors() Returns the authors of this entry as an array (split by " and ")

formatAuthor($author) Returns the formated author name w.r.t to the user preference encoded in USE_COMMA_AS_NAME_SEPARATOR_IN_OUTPUT and USE_INITIALS_FOR_NAMES

formatAuthorCanonical($author) Returns the formated author name as "FirstName LastName".

formatAuthorCommaSeparated($author) Returns the formated author name as "LastName, FirstName".

formatAuthorInitials($author) Returns the formated author name as "LastName Initials". e.g. for Vancouver-style used by PubMed.

formattedAuthors() @deprecated

getFormattedAuthors() @deprecated

getFormattedAuthorsImproved() @deprecated

getFormattedAuthorsArray() Returns the authors as an array of strings (one string per author).

getFormattedAuthorsString() Adds to getFormattedAuthors() the home page links and returns a string (not an array). Is configured with BIBTEXBROWSER_AUTHOR_LINKS and USE_COMMA_AS_NAME_SEPARATOR_IN_OUTPUT.

addAuthorPageLink($author) adds a link to the author page

getCanonicalAuthors() Returns the authors of this entry as an array in a canonical form

getArrayOfCommaSeparatedAuthors() Returns the authors of this entry as an array in a comma-separated form Mostly used to create meta tags (eg <meta>

getCompactedAuthors() Returns a compacted string form of author names by throwing away all author names except for the first one and appending ", et al."

addHomepageLink($author) add the link to the homepage if it is defined in a string e.g. @string{hp_MartinMonperrus="http://www.monperrus.net/martin"} The string is a concatenation of firstname, lastname, prefixed by hp_ Warning: by convention @string are case sensitive so please be keep the same case as author names @thanks Eric Bodden for the idea

getEditors() Returns the editors of this entry as an arry

getFormattedEditors() Returns the editors of this entry as an arry

getYear() Returns the year of this entry?

getKeywords() returns the array of keywords

getField($name) Returns the value of the given field?

getFields() Returns the fields

getRawAbbrv() Returns the raw, undecorated abbreviation depending on ABBRV_TYPE.

getAbbrv() Returns the abbreviation, etc [1] if ABBRV_TYPE='index'.

setAbbrv($abbrv) Sets the abbreviation (e.g. [OOPSLA] or [1])

getText() Returns the verbatim text of this bib entry.

hasPhrase($phrase, $field) Returns true if this bib entry contains the given phrase (PREG regexp) in the given field. if $field is null, all fields are considered. Note that this method is NOT case sensitive

toHTML($wrapped) Outputs HTML line according to layout

toCoins() Outputs an coins URL: see http://ocoins.info/cobg.html Used by Zotero, mendeley, etc.

anchor() Returns an anchor for this entry.

getConstants() rebuild the set of constants used if any as a string

toEntryUnformatted() Displays a text of the given bib entry. URLs are replaced by HTML links.

getFullText() Gets the raw text of the entry (crossref + strings + entry)