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
$attachmentFields
array
public
mixed
$attachmentFields
$categoryFields
array
public
mixed
$categoryFields
$collectionFields
array
public
mixed
$collectionFields
$groupByResourceId
boolean
public
mixed
$groupByResourceId
= \TRUE
$keywordFields
array
public
mixed
$keywordFields
$languageFields
array
public
mixed
$languageFields
$limit
string
public
mixed
$limit
= 0
$listFields
array
public
mixed
$listFields
$metadataFields
array
public
mixed
$metadataFields
$musingFields
array
public
mixed
$musingFields
$pageFields
array
public
mixed
$pageFields
$publisherFields
array
public
mixed
$publisherFields
$resourceFields
array
public
mixed
$resourceFields
$resourceMiscFields
array
public
mixed
$resourceMiscFields
$textFields
array
public
mixed
$textFields
$timestampFields
array
public
mixed
$timestampFields
$unixTimestampFields
array
public
mixed
$unixTimestampFields
$userFields
array
public
mixed
$userFields
$withUnixTimestamp
boolean
public
mixed
$withUnixTimestamp
= \FALSE
$yearFields
array
public
mixed
$yearFields
Methods
__construct()
RESOURCECOMMON
public
__construct() : mixed
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
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|stringtableSetup()
set DB stuff including list operation fields
public
tableSetup() : mixed