WIKINDX API trunk

RESOURCECOMMON
in package

RESOURCECOMMON class

Common functions for quotes and paraphrases

Table of Contents

Properties

$attachmentFields  : mixed
array
$categoryFields  : mixed
array
$collectionFields  : mixed
array
$groupByResourceId  : mixed
boolean
$keywordFields  : mixed
array
$languageFields  : mixed
array
$limit  : mixed
string
$listFields  : mixed
array
$metadataFields  : mixed
array
$musingFields  : mixed
array
$pageFields  : mixed
array
$publisherFields  : mixed
array
$resourceFields  : mixed
array
$resourceMiscFields  : mixed
array
$textFields  : mixed
array
$timestampFields  : mixed
array
$unixTimestampFields  : mixed
array
$userFields  : mixed
array
$withUnixTimestamp  : mixed
boolean
$yearFields  : mixed
array

Methods

__construct()  : mixed
RESOURCECOMMON
getResource()  : mixed
Return resultset for one or more resources.
insert()  : mixed
Insert new resource into database.
showCitations()  : false|string
show citations about this resource
tableSetup()  : mixed
set DB stuff including list operation fields

Properties

$groupByResourceId

boolean

public mixed $groupByResourceId = \TRUE

$withUnixTimestamp

boolean

public mixed $withUnixTimestamp = \FALSE

Methods

getResource()

Return resultset for one or more resources.

public getResource([array<string|int, mixed> $ids = false ][, string $order1 = false ][, string $order2 = false ][, string $order3 = false ][, string $subQuery = false ][, bool $sqlOnly = false ]) : mixed

NB -- resource ID conditions can be set elsewhere $orderX is for footnote ordering or $order1 is for the ordering of CMS output.

Parameters
$ids : array<string|int, mixed> = false

Resource IDs, default is FALSE

$order1 : string = false

Default is FALSE

$order2 : string = false

Default is FALSE

$order3 : string = false

Default is FALSE

$subQuery : string = false

Can come from elsewhere such as core/cms/CMS.php. Default is FALSE

$sqlOnly : bool = false

Don't execute, just return SQL statement. Default is FALSE

Return values
mixed

SQL statement|SQL resource object

insert()

Insert new resource into database.

public insert(array<string|int, mixed> $v[, bool &$alreadyExisted = false ][, array<string|int, mixed> &$errs = [] ]) : mixed
Parameters
$v : array<string|int, mixed>

POST/GET variables needed to create resource (the actual required and optional keys should be specified)

$alreadyExisted : bool = false

Indicates if the resource already exists. Reference, default is FALSE

$errs : array<string|int, mixed> = []

Array to push any errors that occur. Reference, default is empty array

Tags
todo

Needs code-review! Is this even where this function should be?

Return values
mixed

FALSE|Resource ID Id of the (new or already existing) resource or returns FALSE on failure.

showCitations()

show citations about this resource

public showCitations(int $resourceId[, bool $countOnly = false ]) : false|string
Parameters
$resourceId : int
$countOnly : bool = false

Default is FALSE

Return values
false|string

tableSetup()

set DB stuff including list operation fields

public tableSetup() : mixed

        
On this page

Search results