WIKINDX METHODS

Method:
formatName()

Class:
EXPORTCOMMON

Method Call:
include_once("core/file/export/EXPORTCOMMON.php");
$common = new EXPORTCOMMON($this->db);
STRING $common->formatName(ASSOC ARRAY: $creatorArray, STRING: $exportType);

Description:
This method returns the full name of a WIKINDX creator as a single string. The names of WIKINDX creators are stored in four fields in the database: firstname, initials, prefix and surname.

$creatorArray is an associative array of the creator's name: array('firstname' => 'Mickey', 'initials' => 'W D', 'prefix' => 'de', 'surname' => 'Maus'). The initials element must be a space-delimited string of initials.

$exportType is a string indicating the target format ('endnote', 'bibtex', 'ris' etc.) and delimiters between elements of $creatorArray will be dealt with differently according to the value here.

Usage:
Example:
	include_once("core/file/export/EXPORTCOMMON.php");
	$common = new EXPORTCOMMON($this->db);
	while($row = $this->db->fetchAssoc($sth))
		$name = $common->formatName($creatorArray, 'bibtex');

WIKINDX home      WIKINDX usage      WIKINDX classes