BIBCITE
Table of Contents
Functions
- settings() : mixed
- Deal with various settings, setting, getting, incrementing, decrementing etc.
- getNameString() : string
- Get the nameString variable
- checkInitials() : string
- Handle initials.
- hyphenatedInitials() : string
- Deal with hyphenated firstnames as initials
- addCreatorDelimiters() : mixed
- add delimiters to creators
- formatMultiplePages() : mixed
- Format multiple pages.
- titleCapitalization() : string
- Do title capitalization
- setEtAl() : string
- Set et al. for multiple creators
- findAlternates() : array<string|int, mixed>
- Find alternate fields dependent on previous or following fields and deal with accordingly.
- formatTitle() : string
- Format a resource title
- formatShortTitle() : string
- Format a resource shorTitle
- mapDependencies() : array<string|int, mixed>
- Deal with __DEPENDENT_ON_PREVIOUS_FIELD__ for pre and post dependent on previous field's existence and __DEPENDENT_ON_NEXT_FIELD__ for pre and post dependent on the next field's existence
- mapTemplateIndependents() : mixed
- Map independent fields of templates.
- mapTemplatePlurals() : array<string|int, mixed>
- Deal with singular/plural dependencies for fields such as pages and creators
- replaceWhitespace() : string
- Replace ASCII whitespace with locale's whitespace character(s) Callback
- stripTemplateBackticks() : mixed
- Strip backticks used in template
- ordinals() : string
- format ordinals
- findAmbiguity() : array<string|int, mixed>
- Identify ambiguous in-text citations and references.
- fillinPreview() : array<string|int, mixed>
- Provide empty array elements in resourceData from the adminstyle plugin's preview functions to conform with what BIBCITEGATEWAY expects.
- setJustify() : mixed
- Generic code for setting justification
- setLineSpace() : mixed
- Generic code for setting line height
- setIndentation() : mixed
- Generic code for setting indentation
- setFontSize() : mixed
- Generic code for setting font size
Functions
settings()
Deal with various settings, setting, getting, incrementing, decrementing etc.
settings(string $method[, mixed $extra = FALSE ]) : mixed
This is a common location for this sort of thing.
Parameters
- $method : string
- $extra : mixed = FALSE
Tags
getNameString()
Get the nameString variable
getNameString(string $initialsStyle, string $firstNameInitial, string $nameStyle, string $uppercase, array<string|int, mixed> $style, array<string|int, mixed> $creator, string $localisation[, bool $citation = FALSE ][, array<string|int, mixed> $citationVars = [] ][, bool $ftUseSurname = FALSE ]) : string
Parameters
- $initialsStyle : string
- $firstNameInitial : string
- $nameStyle : string
- $uppercase : string
- $style : array<string|int, mixed>
- $creator : array<string|int, mixed>
- $localisation : string
- $citation : bool = FALSE
-
default = FALSE
- $citationVars : array<string|int, mixed> = []
-
default = []
- $ftUseSurname : bool = FALSE
-
default = FALSE
Return values
stringcheckInitials()
Handle initials.
checkInitials(array<string|int, mixed> &$creator, int $initialsStyle, bool $firstNameInitial, string $localisation) : string
Parameters
- $creator : array<string|int, mixed>
-
Associative array of creator name e.g.
array(['surname'] => 'Grimshaw', ['firstname'] => Mark, ['initials'] => 'M N G', ['prefix'] => ))
Initials must be space-delimited.
- $initialsStyle : int
- $firstNameInitial : bool
- $localisation : string
Tags
Return values
string —Formatted string of initials.
hyphenatedInitials()
Deal with hyphenated firstnames as initials
hyphenatedInitials(string $hyphenated, int $initialsStyle) : string
'Jean-Pierre' should become 'J.-P.'
Parameters
- $hyphenated : string
- $initialsStyle : int
Return values
stringaddCreatorDelimiters()
add delimiters to creators
addCreatorDelimiters(array<string|int, mixed> $style, array<string|int, mixed> &$cArray, string $delimitTwo, string $delimitFirstBetween, string $delimitNextBetween, string $delimitLast) : mixed
Parameters
- $style : array<string|int, mixed>
- $cArray : array<string|int, mixed>
- $delimitTwo : string
- $delimitFirstBetween : string
- $delimitNextBetween : string
- $delimitLast : string
formatMultiplePages()
Format multiple pages.
formatMultiplePages(int $pageFormat, int $rangeDelimiter, string $start, string $end) : mixed
$this->style['pageFormat']: 0 == 132-9 1 == 132-39 2 == 132-139
Parameters
- $pageFormat : int
- $rangeDelimiter : int
- $start : string
-
Page start.
- $end : string
-
Page end.
titleCapitalization()
Do title capitalization
titleCapitalization(string $pString, string $delimitLeft, string $delimitRight[, int $CondCapitalization = 1 ]) : string
Parameters
- $pString : string
-
Raw title string.
- $delimitLeft : string
- $delimitRight : string
- $CondCapitalization : int = 1
-
Default is 1.
Return values
string —Formatted title string.
setEtAl()
Set et al. for multiple creators
setEtAl(array<string|int, mixed> &$creators, int $limit, bool $italics, string $abbreviation) : string
Parameters
- $creators : array<string|int, mixed>
- $limit : int
- $italics : bool
- $abbreviation : string
Return values
stringfindAlternates()
Find alternate fields dependent on previous or following fields and deal with accordingly.
findAlternates(array<string|int, mixed> $template, array<string|int, mixed> $item) : array<string|int, mixed>
Parameters
- $template : array<string|int, mixed>
- $item : array<string|int, mixed>
Return values
array<string|int, mixed>formatTitle()
Format a resource title
formatTitle(array<string|int, mixed> $resource, array<string|int, mixed> $styleCitation, string $puncPattern, string $space[, bool $trans = FALSE ]) : string
Parameters
- $resource : array<string|int, mixed>
- $styleCitation : array<string|int, mixed>
- $puncPattern : string
- $space : string
- $trans : bool = FALSE
-
Default FALSE
Return values
stringformatShortTitle()
Format a resource shorTitle
formatShortTitle(array<string|int, mixed> $resource, array<string|int, mixed> $styleCitation[, bool $trans = FALSE ][, bool $ftUseTitle = FALSE ]) : string
Parameters
- $resource : array<string|int, mixed>
- $styleCitation : array<string|int, mixed>
- $trans : bool = FALSE
-
Default FALSE
- $ftUseTitle : bool = FALSE
-
Default FALSE
Return values
stringmapDependencies()
Deal with __DEPENDENT_ON_PREVIOUS_FIELD__ for pre and post dependent on previous field's existence and __DEPENDENT_ON_NEXT_FIELD__ for pre and post dependent on the next field's existence
mapDependencies(array<string|int, mixed> $value, bool $previousFieldExists, mixed $nextFieldExists, string $pre, string $post) : array<string|int, mixed>
Parameters
- $value : array<string|int, mixed>
- $previousFieldExists : bool
- $nextFieldExists : mixed
- $pre : string
- $post : string
Return values
array<string|int, mixed>mapTemplateIndependents()
Map independent fields of templates.
mapTemplateIndependents(array<string|int, mixed> $independent, array<string|int, mixed> &$itemArray) : mixed
Check for independent characters. These (should) come in pairs.
Parameters
- $independent : array<string|int, mixed>
- $itemArray : array<string|int, mixed>
mapTemplatePlurals()
Deal with singular/plural dependencies for fields such as pages and creators
mapTemplatePlurals(array<string|int, mixed> $value, string $pre, string $post, mixed $plurals) : array<string|int, mixed>
Parameters
- $value : array<string|int, mixed>
- $pre : string
- $post : string
- $plurals : mixed
Return values
array<string|int, mixed>replaceWhitespace()
Replace ASCII whitespace with locale's whitespace character(s) Callback
replaceWhitespace(string $input, string $citeLocalisation) : string
Parameters
- $input : string
- $citeLocalisation : string
Return values
stringstripTemplateBackticks()
Strip backticks used in template
stripTemplateBackticks(string $pre, mixed $post) : mixed
Parameters
- $pre : string
- $post : mixed
ordinals()
format ordinals
ordinals(array<string|int, mixed> $matches, string $output) : string
Parameters
- $matches : array<string|int, mixed>
- $output : string
Return values
stringfindAmbiguity()
Identify ambiguous in-text citations and references.
findAmbiguity(array<string|int, mixed> $sentences, array<string|int, mixed> $resIds, int $ambiguousAction) : array<string|int, mixed>
An ambiguous citation is one reference that has the same creator(s) and publication year(s) as another. There are three options: Do nothing (use the original templates for the citation and reference) Add a letter after the year with the original citation template (in which case the bibliographic entry must also use the letter) Use the ambiguous template for the in-text citation and no letter for the reference.
The order of the reference in the bibliography provides the ordering of the letters. The $resIds array provides this order.
Parameters
- $sentences : array<string|int, mixed>
- $resIds : array<string|int, mixed>
- $ambiguousAction : int
-
(1 = letter, 2 = template)
Return values
array<string|int, mixed>fillinPreview()
Provide empty array elements in resourceData from the adminstyle plugin's preview functions to conform with what BIBCITEGATEWAY expects.
fillinPreview(array<string|int, mixed> $resourceData) : array<string|int, mixed>
Parameters
- $resourceData : array<string|int, mixed>
Return values
array<string|int, mixed>setJustify()
Generic code for setting justification
setJustify(string $input) : mixed
Parameters
- $input : string
setLineSpace()
Generic code for setting line height
setLineSpace(string $input) : mixed
Parameters
- $input : string
setIndentation()
Generic code for setting indentation
setIndentation(string $input[, mixed $bq = FALSE ]) : mixed
Parameters
- $input : string
- $bq : mixed = FALSE
setFontSize()
Generic code for setting font size
setFontSize(string $input) : mixed
Parameters
- $input : string