Properties

$preview

$preview : 

Preview.

Type

$footnotePages

$footnotePages : 

Some styles require different templates and formatting of creator names for a citation in a footnote as opposed to a full bibliography.

Setting this to TRUE (set externally in CITEFORMAT) loads a different set of templates and settings for footnotes. The default FALSE is for full bibliography.

Type

$footnoteStyle

$footnoteStyle : 

boolean

Type

$citationFootnote

$citationFootnote : 

boolean

Type

$output

$output : 

Output medium: 'html', 'rtf', or 'plain'

Type

$wikindx

$wikindx : 

boolean

Type

$type

$type : 

string

Type

$patterns

$patterns : 

Highlight preg pattern and CSS class for HTML display

Type

$patternHighlight

$patternHighlight : 

boolean

Type

$styleMap

$styleMap : 

array

Type

$customTypes

$customTypes : 

array

Type

Methods

__construct()

__construct(  output = html) : 

BIBFORMAT

Parameters

output

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

Returns

initialise()

initialise() : 

Initialise bibformat system

Returns

getStyle()

getStyle(mixed||string|int  common, mixed||string|int  types, mixed||string|int  footnote) : 

Transform the raw data from the XML file into usable arrays and load some data arrays

Parameters

mixed||string|int common

Array of global formatting data

mixed||string|int types

Array of style definitions for each resource type

mixed||string|int footnote

Array of style definitions for footnote creators

Returns

preProcess()

preProcess(  type, mixed||string|int  row) : mixed||string|int

Perform pre-processing on the raw SQL array

Parameters

type

The resource type

mixed||string|int row

Associate array of raw SQL data

Returns

mixed||string|int —

Processed row of raw SQL data

map()

map(  template = FALSE) : 

Map the $item array against the style array ($this->$type) for this resource type and produce a string ready to be formatted for bold, italics etc.

Parameters

template

If called from CITEFORMAT, this is the array of template elements. Default is FALSE.

Returns

For printing to the output medium.

formatNames()

formatNames(mixed||string|int  creators,   nameType,   shortFootnote = FALSE) : 

Format creator name lists (authors, editors, etc.)

Parameters

mixed||string|int creators

Multi-associative array of creator names e.g. this array might be of the primary authors:

array([0] => array(['surname'] => 'Grimshaw', ['firstname'] => Mark, ['initials'] => 'N', ['prefix'] => ),
   [1] => array(['surname'] => 'Witt', ['firstname'] => Jan, ['initials'] => , ['prefix'] => 'de'))
nameType

'creator1', 'creator2' etc.

shortFootnote

If TRUE, this is being used for just the primary creator names in a footnote style citation using Ibid, Idem, op cit. etc. Default is FALSE.

Returns

Optional if $nameType == 'citation': formatted string of all creator names in the input array.

checkInitials()

checkInitials(mixed||string|int  creator,   initialsStyle,   firstNameInitial) : 

Handle initials.

Parameters

mixed||string|int creator

Associative array of creator name e.g.

array(['surname'] => 'Grimshaw', ['firstname'] => Mark, ['initials'] => 'M N G', ['prefix'] => ))

Initials must be space-delimited.

initialsStyle
firstNameInitial

Returns

Formatted string of initials.

addItem()

addItem(  item,   fieldName) : 

Add an item to $this->item array

Parameters

item

The item to be added.

fieldName

The database fieldName of the item to be added

Returns

addAllOtherItems()

addAllOtherItems(mixed||string|int  row) : 

Add all remaining items to $this->item array

Parameters

mixed||string|int row

The items to be added.

Returns

formatTitle()

formatTitle(  pString,   delimitLeft = FALSE,   delimitRight = FALSE) : 

Format a title. Anything enclosed in $delimitLeft...$delimitRight is to be left unchanged

Parameters

pString

Raw title string.

delimitLeft

Default is FALSE.

delimitRight

Default is FALSE.

Returns

formatShortTitle()

formatShortTitle(  pString,   delimitLeft = FALSE,   delimitRight = FALSE) : 

Format a shortTitle. Anything enclosed in $delimitLeft...$delimitRight is to be left unchanged

Parameters

pString

Raw title string.

delimitLeft

Default is FALSE.

delimitRight

Default is FALSE.

Returns

formatTransTitle()

formatTransTitle(  pString,   delimitLeft = FALSE,   delimitRight = FALSE) : 

Format a title of the original work from which a translation has been made. Anything enclosed in $delimitLeft...$delimitRight is to be left unchanged

Parameters

pString

Raw title string.

delimitLeft

Default is FALSE.

delimitRight

Default is FALSE.

Returns

titleCapitalization()

titleCapitalization(  pString,   delimitLeft,   delimitRight,   CondCapitalization = TRUE) : 

Do title capitalization

Parameters

pString

Raw title string.

delimitLeft
delimitRight
CondCapitalization

Default is TRUE.

Returns

Formatted title string.

formatPages()

formatPages(  start,   end = FALSE,   citation = FALSE) : 

Format pages.

$this->style['pageFormat']: 0 == 132-9 1 == 132-39 2 == 132-139

Parameters

start

Page start.

end

Page end. Default is FALSE.

citation

If called from CITEFORMAT, this is the array of citation stylings. Default is FALSE.

Returns

Pages.

formatRunningTime()

formatRunningTime(  minutes,   hours) : 

Format runningTime for film/broadcast

Parameters

minutes
hours

Returns

formatDate()

formatDate(  startDay,   startMonth,   endDay,   endMonth,   webArticle = FALSE) : 

Format date

Parameters

startDay
startMonth
endDay
endMonth
webArticle

Default is FALSE.

for 'web_article', $startDay and $startMonth represent the publication date

Returns

formatEdition()

formatEdition(  edition) : 

Format edition

Parameters

edition

Returns

loadArrays()

loadArrays() : 

Set-up localisations etc.

Returns