RESOURCEMAP

Provides mappings between resource types and the database tables.

version 1
package wikindx4\core\resources
author Mark Grimshaw

 Methods

RESOURCEMAP

__construct() 

Get keys of resource type messages from array

getMsgKeys(string $type) : array

Parameters

$type

string

Returns

array

Get optional array

getOptional() : array

Returns

array

Return list of all required fields for each resource type

getRequired() : array

Returns

array

Return list of db tables used for each resource type.

getTables(string $type) : array

Ensure the resource table exists and always comes first.

author Mark Grimshaw

Parameters

$type

string

Returns

arrayof db tables

Return array of resource types' mapping and perform some optimization and error checking.

getTypeMap() : array
author Mark Grimshaw

Returns

array

Get getTypes array

getTypes() : array

Returns

array

Get database field from readable name of resource type

lookupDBfield(string $type, string $readableName) : string

Parameters

$type

string

$readableName

string

Returns

string

Get readable name of resource type from database field

lookupReadableName(string $type, string $tableName, string $dbName) : string

Parameters

$type

string

$tableName

string

$dbName

string

Returns

string

Create arrays based on database table and resource type.

loadMap() 

The key of the resource_xxx arrays is the database field within the WKX_resource_xxx database table. The value of the resource_xxx arrays is the key input to the MESSAGES class for language localizations.

author Mark Grimshaw
version 1

 Properties

 

$optional 
 

$returnTypeMap 
 

$reverseTypeMap 
 

$typeMap 
 

$types