WIKINDX API trunk

CREATOR
in package

Common functions for creators

Table of Contents

Methods

__construct()  : mixed
CREATOR class.
checkExists()  : int
Does this creator already exist in the database?
formatInitials()  : string
Format initials prior to storing in database
grabAll()  : array<string|int, mixed>
Get creators from creators table.
grabGroupAvailableMembers()  : mixed
Gather creators who are not group members
grabGroupMasters()  : mixed
Gather creators who are group masters
grabGroupMembers()  : mixed
Gather creators who are group members of one group
insert()  : int
Inserts a new creator in the database.
removeHanging()  : mixed
Remove resource-less and collection-less creators
transferArrows()  : array<string|int, mixed>
Make the creator select transfer arrows to transfer creators between select boxes with onclick

Methods

__construct()

CREATOR class.

public __construct() : mixed

checkExists()

Does this creator already exist in the database?

public checkExists(string $surname, string $firstname, string $initials, string $prefix) : int
Parameters
$surname : string
$firstname : string
$initials : string
$prefix : string
Return values
int

creator ID if exists, FALSE otherwise

formatInitials()

Format initials prior to storing in database

public formatInitials(string $raw) : string

Initials are stored unpunctuated and space-delimited. In the final result, they can only consist of A-Z (and UTF-8) and space characters

Parameters
$raw : string
Return values
string

grabAll()

Get creators from creators table.

public grabAll([int $userBib = false ][, mixed $typeArray = false ][, mixed $metadata = false ][, bool $group = false ]) : array<string|int, mixed>
Parameters
$userBib : int = false

ID of user bibliography to use. Default is FALSE

$typeArray : mixed = false

array of resource types within which to select creators. Default is FALSE

$metadata : mixed = false

metadata type or metadata array ('quote', 'paraphrase' etc) -- gather only creators for resources which have metadata Default is FALSE

$group : bool = false

group database creators together into the same person if TRUE. Default is FALSE

Return values
array<string|int, mixed>

of id => creator

grabGroupAvailableMembers()

Gather creators who are not group members

public grabGroupAvailableMembers() : mixed
Return values
mixed

FALSE|array of creators

grabGroupMasters()

Gather creators who are group masters

public grabGroupMasters() : mixed
Return values
mixed

FALSE|array of creators

grabGroupMembers()

Gather creators who are group members of one group

public grabGroupMembers(int $masterId) : mixed
Parameters
$masterId : int
Return values
mixed

FALSE|array of creators

insert()

Inserts a new creator in the database.

public insert(array<string|int, mixed> $v) : int
Parameters
$v : array<string|int, mixed>

Array of surname, firstname, initials, prefix

Return values
int

Inserted ID

removeHanging()

Remove resource-less and collection-less creators

public removeHanging([bool $collectionDefaults = true ]) : mixed
Parameters
$collectionDefaults : bool = true

If TRUE, remove references to deleted creators in collection defaults fields. Default = TRUE

transferArrows()

Make the creator select transfer arrows to transfer creators between select boxes with onclick

public transferArrows() : array<string|int, mixed>
Return values
array<string|int, mixed>

(toRightImage, toLeftImage)


        
On this page

Search results