\CITESTYLE

CITATION STYLE class. Format citations.

For non-WIKINDX users, you must have set up BIBFORMAT before using this (see documentation for BIBFORMAT()).

Summary

Methods
Properties
Constants
__construct()
start()
bibliographyProcess()
printBibliography()
parseCiteTag()
process()
ordinals()
createTitle()
createPrePostText()
grabNames()
createUrl()
removeSlashes()
$output
$rtfBibExport
$dir
$citeFormat
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$output

$output : 

string

Type

$rtfBibExport

$rtfBibExport : 

boolean

Type

$dir

$dir : 

boolean

Type

$citeFormat

$citeFormat : 

object

Type

Methods

__construct()

__construct(  output = html) : 

CITESTYLE

Parameters

output

'html', plain', 'rtf'. Default is 'html'

Returns

start()

start(  text,   citeLink) : 

Start the whole process off by finding [cite]...[/cite] tags in input text.

WIKINDX uses [cite]34[/cite] or [cite]34:23[/cite] or [cite]34:23-24[/cite] where '34' is the resource's unique ID, '23' is a single page for the citation and '23-24' is a page range for the citation. If your system uses something else, you will need to make changes here and in $this->parseCiteTag(). PreText and postText can also be encoded: e.g. (see Grimshaw 2003; Boulanger 2004 for example) [cite]23:34-35|see ` for example[/cite]

Parameters

text
citeLink

Returns

bibliographyProcess()

bibliographyProcess() : 

Gather bibliography of citations.

The order is important:

  1. for in-text citations as it controls disambiguation where a letter is added after the year.
  2. for endnote-style citations, if your bibliographic style says that a resource following another by the same creator(s) should have the creator(s) replaced by something like '___', order is again important.
  3. for endnote-style citations having the same id no. for the same resource where the id no. in the text follows the bibliography order.

Returns

printBibliography()

printBibliography(mixed||string|int  bibliography) : 

Process bibliography array into string for output -- used for in-text citations and appended bibliographies for footnotes

Parameters

mixed||string|int bibliography

Returns

parseCiteTag()

parseCiteTag(  matchIndex,   tag) : 

Parse the cite tag by extracting resource ID and any page numbers. Check ID is valid.

PreText and postText can also be encoded: e.g. (see Grimshaw 2003; Boulanger 2004 for example) [cite]23:34-35|see ` for example[/cite]. For multiple citations, only the first encountered preText and postText will be used to enclose the citations.

Parameters

matchIndex
tag

Returns

process()

process(mixed||string|int  row,   id) : 

Accept a SQL result row of raw bibliographic data and process it.

We build up the $citeFormat->item array with formatted parts from the raw $row

Parameters

mixed||string|int row
id

Returns

ordinals()

ordinals(mixed||string|int  matches) : 

callback for ordinals

Parameters

mixed||string|int matches

Returns

createTitle()

createTitle() : 

Create the resource title

Returns

createPrePostText()

createPrePostText(  preText,   postText) : 

Create preText and postText

Parameters

preText
postText

Returns

grabNames()

grabNames(  citationId) : 

get names from database for creator, editor, translator etc.

Parameters

citationId

Returns

createUrl()

createUrl() : 

Create the URL

Returns

removeSlashes()

removeSlashes(  element) : 

Remove slashes

Parameters

element

Returns