Parse BibTeX authors

version 1
package wikindx4\core\importexport
author Daniel Reidsma/Mark Grimshaw

 Methods

BIBTEXCREATORPARSE

__construct() 

converts a first name to initials -- not currently used

getInitials(string $firstname) : string

Parameters

$firstname

string

Returns

string

Create writer arrays from bibtex input.

parse(string $input) : mixed

'author field can be (delimiters between authors are 'and' or '&'): There are three possible cases: 1: First von Last 2: von Last, First 3: von Last, Jr, First

Parameters

$input

string

Returns

mixedFALSE|array (firstname, initials, surname, jr, von)

Explodes a string but not when the delimiter occurs within a pair of braces

explodeString(string $delimiter, string $val) : array

Parameters

$delimiter

string

$val

string

Returns

array

Format firstname

formatFirstname(string $firstname) : string

Parameters

$firstname

string

Returns

string

returns the case of a string

getStringCase(string $string) : string

Case determination: non-alphabetic chars are caseless the first alphabetic char determines case if a string is caseless, it is grouped to its neighbour string.

Parameters

$string

string

Returns

string

gets the "von" and "last" part from the author array

getVonLast(string $author) : array

Parameters

$author

string

Returns

array(von, surname)

separates initials from a firstname

separateInitialsFunc(string $firstname) : array

Parameters

$firstname

string

Returns

array(firstname, initials)

 Properties

 

$removeBraces 
 

$removeEtAl 
 

$removeTilde 
 

$separateInitials 
 

$prefix