Class to provide a connection to a persistent store for LTI objects. More...
Public Member Functions | |
bool | loadPlatform (Platform $platform) |
Load platform object. | |
bool | savePlatform (Platform $platform) |
Save platform object. | |
bool | deletePlatform (Platform $platform) |
Delete platform object. | |
Platform[] | getPlatforms () |
Load platform objects. | |
bool | loadContext (Context $context) |
Load context object. | |
bool | saveContext (Context $context) |
Save context object. | |
bool | deleteContext (Context $context) |
Delete context object. | |
bool | loadResourceLink (ResourceLink $resourceLink) |
Load resource link object. | |
bool | saveResourceLink (ResourceLink $resourceLink) |
Save resource link object. | |
bool | deleteResourceLink (ResourceLink $resourceLink) |
Delete resource link object. | |
UserResult[] | getUserResultSourcedIDsResourceLink (ResourceLink $resourceLink, bool $localOnly, ?IdScope $idScope) |
Get array of user objects. | |
ResourceLinkShare[] | getSharesResourceLink (ResourceLink $resourceLink) |
Get array of shares defined for this resource link. | |
bool | loadPlatformNonce (PlatformNonce $nonce) |
Load nonce object. | |
bool | savePlatformNonce (PlatformNonce $nonce) |
Save nonce object. | |
bool | deletePlatformNonce (PlatformNonce $nonce) |
Delete nonce object. | |
bool | loadAccessToken (AccessToken $accessToken) |
Load access token object. | |
bool | saveAccessToken (AccessToken $accessToken) |
Save access token object. | |
bool | loadResourceLinkShareKey (ResourceLinkShareKey $shareKey) |
Load resource link share key object. | |
bool | saveResourceLinkShareKey (ResourceLinkShareKey $shareKey) |
Save resource link share key object. | |
bool | deleteResourceLinkShareKey (ResourceLinkShareKey $shareKey) |
Delete resource link share key object. | |
bool | loadUserResult (UserResult $userResult) |
Load user object. | |
bool | saveUserResult (UserResult $userResult) |
Save user object. | |
bool | deleteUserResult (UserResult $userResult) |
Delete user object. | |
bool | loadTool (Tool $tool) |
Load tool object. | |
bool | saveTool (Tool $tool) |
Save tool object. | |
bool | deleteTool (Tool $tool) |
Delete tool object. | |
Tool[] | getTools () |
Load tool objects. | |
Static Public Member Functions | |
static bool | useMemcache (?string $host=null, int $port=-1) |
Set/check whether memcached should be used when available. | |
static DataConnector | getDataConnector (mixed $db=null, string $dbTableNamePrefix='', string $type='') |
Create data connector object. | |
Public Attributes | |
const | PLATFORM_TABLE_NAME = 'lti2_consumer' |
Default name for database table used to store platforms. | |
const | CONTEXT_TABLE_NAME = 'lti2_context' |
Default name for database table used to store contexts. | |
const | RESOURCE_LINK_TABLE_NAME = 'lti2_resource_link' |
Default name for database table used to store resource links. | |
const | USER_RESULT_TABLE_NAME = 'lti2_user_result' |
Default name for database table used to store users. | |
const | RESOURCE_LINK_SHARE_KEY_TABLE_NAME = 'lti2_share_key' |
Default name for database table used to store resource link share keys. | |
const | NONCE_TABLE_NAME = 'lti2_nonce' |
Default name for database table used to store nonce values. | |
const | ACCESS_TOKEN_TABLE_NAME = 'lti2_access_token' |
Default name for database table used to store access token values. | |
const | TOOL_TABLE_NAME = 'lti2_tool' |
Default name for database table used to store tools. | |
Protected Member Functions | |
__construct (mixed $db, string $dbTableNamePrefix='') | |
Class constructor. | |
void | fixPlatformSettings (Platform $platform, bool $isSave) |
Adjust the settings for any platform properties being stored as a setting value. | |
void | fixToolSettings (Tool $tool, bool $isSave) |
Adjust the settings for any tool properties being stored as a setting value. | |
string | dbTableName (string $table) |
Add the prefix to the name for a database table. | |
Protected Attributes | |
mixed | $db = null |
Database connection. | |
string | $dbTableNamePrefix = '' |
Prefix for database table names. | |
string | $dateFormat = 'Y-m-d' |
SQL date format (default = 'Y-m-d') | |
string | $timeFormat = 'H:i:s' |
SQL time format (default = 'H:i:s') | |
Class to provide a connection to a persistent store for LTI objects.
This class assumes no data persistence - it should be extended for specific database connections.
|
protected |
Class constructor.
object | resource | $db | Database connection object |
string | $dbTableNamePrefix | Prefix for database table names (optional, default is none) |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_oci8.
|
protected |
Add the prefix to the name for a database table.
string | $table | Name of table without prefix |
Referenced by ceLTIc\LTI\DataConnector\DataConnector_oci8\__construct(), ceLTIc\LTI\DataConnector\DataConnector_mysqli\deleteContext(), ceLTIc\LTI\DataConnector\DataConnector_sql\deleteContext(), ceLTIc\LTI\DataConnector\DataConnector_oci8\deletePlatform(), ceLTIc\LTI\DataConnector\DataConnector_pdo\deletePlatform(), ceLTIc\LTI\DataConnector\DataConnector_pgsql\deletePlatform(), ceLTIc\LTI\DataConnector\DataConnector_sql\deletePlatform(), ceLTIc\LTI\DataConnector\DataConnector_oci8\deletePlatformNonce(), ceLTIc\LTI\DataConnector\DataConnector_pdo\deletePlatformNonce(), ceLTIc\LTI\DataConnector\DataConnector_pgsql\deleteResourceLink(), ceLTIc\LTI\DataConnector\DataConnector_sql\deleteResourceLink(), ceLTIc\LTI\DataConnector\DataConnector_mysqli\deleteResourceLinkShareKey(), ceLTIc\LTI\DataConnector\DataConnector_mysqli\deleteUserResult(), ceLTIc\LTI\DataConnector\DataConnector_sql\deleteUserResult(), ceLTIc\LTI\DataConnector\DataConnector_mysqli\getSharesResourceLink(), ceLTIc\LTI\DataConnector\DataConnector_oci8\getSharesResourceLink(), ceLTIc\LTI\DataConnector\DataConnector_pdo\getSharesResourceLink(), ceLTIc\LTI\DataConnector\DataConnector_pgsql\getSharesResourceLink(), ceLTIc\LTI\DataConnector\DataConnector_sql\getSharesResourceLink(), ceLTIc\LTI\DataConnector\DataConnector_mysqli\getUserResultSourcedIDsResourceLink(), ceLTIc\LTI\DataConnector\DataConnector_pgsql\getUserResultSourcedIDsResourceLink(), ceLTIc\LTI\DataConnector\DataConnector_mysqli\loadAccessToken(), ceLTIc\LTI\DataConnector\DataConnector_oci8\loadAccessToken(), ceLTIc\LTI\DataConnector\DataConnector_pdo\loadAccessToken(), ceLTIc\LTI\DataConnector\DataConnector_pgsql\loadAccessToken(), ceLTIc\LTI\DataConnector\DataConnector_sql\loadAccessToken(), ceLTIc\LTI\DataConnector\DataConnector_mysqli\loadPlatform(), ceLTIc\LTI\DataConnector\DataConnector_oci8\loadPlatform(), ceLTIc\LTI\DataConnector\DataConnector_pdo\loadPlatform(), ceLTIc\LTI\DataConnector\DataConnector_sql\loadPlatform(), ceLTIc\LTI\DataConnector\DataConnector_mysqli\loadPlatformNonce(), ceLTIc\LTI\DataConnector\DataConnector_oci8\loadPlatformNonce(), ceLTIc\LTI\DataConnector\DataConnector_pdo\loadPlatformNonce(), ceLTIc\LTI\DataConnector\DataConnector_pgsql\loadPlatformNonce(), ceLTIc\LTI\DataConnector\DataConnector_sql\loadPlatformNonce(), ceLTIc\LTI\DataConnector\DataConnector_mysqli\loadResourceLinkShareKey(), ceLTIc\LTI\DataConnector\DataConnector_oci8\loadResourceLinkShareKey(), ceLTIc\LTI\DataConnector\DataConnector_pdo\loadResourceLinkShareKey(), ceLTIc\LTI\DataConnector\DataConnector_pgsql\loadResourceLinkShareKey(), ceLTIc\LTI\DataConnector\DataConnector_sql\loadResourceLinkShareKey(), ceLTIc\LTI\DataConnector\DataConnector_mysqli\loadUserResult(), ceLTIc\LTI\DataConnector\DataConnector_oci8\loadUserResult(), ceLTIc\LTI\DataConnector\DataConnector_pdo\loadUserResult(), ceLTIc\LTI\DataConnector\DataConnector_pgsql\loadUserResult(), ceLTIc\LTI\DataConnector\DataConnector_sql\loadUserResult(), ceLTIc\LTI\DataConnector\DataConnector_mysqli\saveAccessToken(), ceLTIc\LTI\DataConnector\DataConnector_pgsql\saveAccessToken(), ceLTIc\LTI\DataConnector\DataConnector_mysqli\saveContext(), ceLTIc\LTI\DataConnector\DataConnector_mysqli\savePlatform(), ceLTIc\LTI\DataConnector\DataConnector_mysqli\savePlatformNonce(), ceLTIc\LTI\DataConnector\DataConnector_sql\savePlatformNonce(), ceLTIc\LTI\DataConnector\DataConnector_mysqli\saveResourceLink(), ceLTIc\LTI\DataConnector\DataConnector_sql\saveResourceLink(), ceLTIc\LTI\DataConnector\DataConnector_mysqli\saveUserResult(), ceLTIc\LTI\DataConnector\DataConnector_pdo\saveUserResult(), ceLTIc\LTI\DataConnector\DataConnector_pgsql\saveUserResult(), and ceLTIc\LTI\DataConnector\DataConnector_sql\saveUserResult().
bool ceLTIc\LTI\DataConnector\DataConnector::deleteContext | ( | Context | $context | ) |
Delete context object.
Context | $context | Context object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
References deleteResourceLink(), and ceLTIc\LTI\ResourceLink\initialize().
Referenced by getPlatforms().
bool ceLTIc\LTI\DataConnector\DataConnector::deletePlatform | ( | Platform | $platform | ) |
Delete platform object.
Platform | $platform | Platform object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
References saveContext().
bool ceLTIc\LTI\DataConnector\DataConnector::deletePlatformNonce | ( | PlatformNonce | $nonce | ) |
Delete nonce object.
PlatformNonce | $nonce | Nonce object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
Referenced by loadPlatformNonce().
bool ceLTIc\LTI\DataConnector\DataConnector::deleteResourceLink | ( | ResourceLink | $resourceLink | ) |
Delete resource link object.
ResourceLink | $resourceLink | ResourceLink object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
References ceLTIc\LTI\PlatformNonce\getPlatform(), ceLTIc\LTI\System\getRecordId(), ceLTIc\LTI\PlatformNonce\getValue(), and loadPlatformNonce().
Referenced by deleteContext().
bool ceLTIc\LTI\DataConnector\DataConnector::deleteResourceLinkShareKey | ( | ResourceLinkShareKey | $shareKey | ) |
Delete resource link share key object.
ResourceLinkShareKey | $shareKey | Resource link share key object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
References deleteUserResult(), and ceLTIc\LTI\UserResult\initialize().
bool ceLTIc\LTI\DataConnector\DataConnector::deleteTool | ( | Tool | $tool | ) |
Delete tool object.
Tool | $tool | Tool object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
References $dbTableNamePrefix.
bool ceLTIc\LTI\DataConnector\DataConnector::deleteUserResult | ( | UserResult | $userResult | ) |
Delete user object.
UserResult | $userResult | UserResult object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
Referenced by deleteResourceLinkShareKey().
|
protected |
Adjust the settings for any platform properties being stored as a setting value.
Platform | $platform | Platform object |
bool | $isSave | True if the settings are being saved |
References ceLTIc\LTI\Util\$logLevel.
|
protected |
Adjust the settings for any tool properties being stored as a setting value.
Tool | $tool | Tool object |
bool | $isSave | True if the settings are being saved |
|
static |
Create data connector object.
A data connector provides access to persistent storage for the different objects.
Names of tables may be given a prefix to allow multiple versions to share the same schema. A separate sub-class is defined for each different database connection - the class to use is determined by inspecting the database object passed, but this can be overridden (for example, to use a bespoke connector) by specifying a type. If no database is passed then this class is used which acts as a dummy connector with no persistence.
object | resource | $db | A database connection object or string (optional, default is no persistence) |
string | $dbTableNamePrefix | Prefix for database table names (optional, default is none) |
string | $type | The type of data connector (optional, default is based on $db parameter) |
References ceLTIc\LTI\Util\$logLevel.
Referenced by saveTool().
Platform[] ceLTIc\LTI\DataConnector\DataConnector::getPlatforms | ( | ) |
Load platform objects.
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
References deleteContext(), and ceLTIc\LTI\Context\initialize().
Referenced by loadPlatform().
ResourceLinkShare[] ceLTIc\LTI\DataConnector\DataConnector::getSharesResourceLink | ( | ResourceLink | $resourceLink | ) |
Get array of shares defined for this resource link.
ResourceLink | $resourceLink | ResourceLink object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
Referenced by saveResourceLink().
Tool[] ceLTIc\LTI\DataConnector\DataConnector::getTools | ( | ) |
Load tool objects.
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
Referenced by loadTool().
UserResult[] ceLTIc\LTI\DataConnector\DataConnector::getUserResultSourcedIDsResourceLink | ( | ResourceLink | $resourceLink, |
bool | $localOnly, | ||
?IdScope | $idScope ) |
Get array of user objects.
Obtain an array of UserResult objects for users with a result sourcedId. The array may include users from other resource links which are sharing this resource link. It may also be optionally indexed by the user ID of a specified scope.
ResourceLink | $resourceLink | Resource link object |
bool | $localOnly | True if only users within the resource link are to be returned (excluding users sharing this resource link) |
IdScope | null | $idScope | Scope value to use for user IDs |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pdo_pgsql, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
References savePlatformNonce().
Referenced by loadResourceLink().
bool ceLTIc\LTI\DataConnector\DataConnector::loadAccessToken | ( | AccessToken | $accessToken | ) |
Load access token object.
AccessToken | $accessToken | Access token object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
Referenced by savePlatformNonce().
bool ceLTIc\LTI\DataConnector\DataConnector::loadContext | ( | Context | $context | ) |
Load context object.
Context | $context | Context object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
References loadResourceLink().
Referenced by savePlatform().
bool ceLTIc\LTI\DataConnector\DataConnector::loadPlatform | ( | Platform | $platform | ) |
Load platform object.
Platform | $platform | Platform object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
References getPlatforms().
Referenced by useMemcache().
bool ceLTIc\LTI\DataConnector\DataConnector::loadPlatformNonce | ( | PlatformNonce | $nonce | ) |
Load nonce object.
PlatformNonce | $nonce | Nonce object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
References deletePlatformNonce(), ceLTIc\LTI\PlatformNonce\getPlatform(), ceLTIc\LTI\System\getRecordId(), and ceLTIc\LTI\PlatformNonce\getValue().
Referenced by deleteResourceLink().
bool ceLTIc\LTI\DataConnector\DataConnector::loadResourceLink | ( | ResourceLink | $resourceLink | ) |
Load resource link object.
ResourceLink | $resourceLink | ResourceLink object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
References getUserResultSourcedIDsResourceLink().
Referenced by loadContext().
bool ceLTIc\LTI\DataConnector\DataConnector::loadResourceLinkShareKey | ( | ResourceLinkShareKey | $shareKey | ) |
Load resource link share key object.
ResourceLinkShareKey | $shareKey | ResourceLink share key object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
References loadUserResult().
bool ceLTIc\LTI\DataConnector\DataConnector::loadTool | ( | Tool | $tool | ) |
Load tool object.
Tool | $tool | Tool object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
References getTools().
Referenced by loadUserResult().
bool ceLTIc\LTI\DataConnector\DataConnector::loadUserResult | ( | UserResult | $userResult | ) |
Load user object.
UserResult | $userResult | UserResult object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
References loadTool().
Referenced by loadResourceLinkShareKey().
bool ceLTIc\LTI\DataConnector\DataConnector::saveAccessToken | ( | AccessToken | $accessToken | ) |
Save access token object.
AccessToken | $accessToken | Access token object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
References saveResourceLinkShareKey().
bool ceLTIc\LTI\DataConnector\DataConnector::saveContext | ( | Context | $context | ) |
Save context object.
Context | $context | Context object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
References saveResourceLink().
Referenced by deletePlatform().
bool ceLTIc\LTI\DataConnector\DataConnector::savePlatform | ( | Platform | $platform | ) |
Save platform object.
Platform | $platform | Platform object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
References loadContext().
bool ceLTIc\LTI\DataConnector\DataConnector::savePlatformNonce | ( | PlatformNonce | $nonce | ) |
Save nonce object.
PlatformNonce | $nonce | Nonce object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
References ceLTIc\LTI\AccessToken\get(), ceLTIc\LTI\AccessToken\getPlatform(), ceLTIc\LTI\System\getRecordId(), and loadAccessToken().
Referenced by getUserResultSourcedIDsResourceLink().
bool ceLTIc\LTI\DataConnector\DataConnector::saveResourceLink | ( | ResourceLink | $resourceLink | ) |
Save resource link object.
ResourceLink | $resourceLink | ResourceLink object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
References getSharesResourceLink().
Referenced by saveContext().
bool ceLTIc\LTI\DataConnector\DataConnector::saveResourceLinkShareKey | ( | ResourceLinkShareKey | $shareKey | ) |
Save resource link share key object.
ResourceLinkShareKey | $shareKey | Resource link share key object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pdo_pgsql, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
References saveUserResult().
Referenced by saveAccessToken().
bool ceLTIc\LTI\DataConnector\DataConnector::saveTool | ( | Tool | $tool | ) |
Save tool object.
Tool | $tool | Tool object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
References $db, $dbTableNamePrefix, and getDataConnector().
bool ceLTIc\LTI\DataConnector\DataConnector::saveUserResult | ( | UserResult | $userResult | ) |
Save user object.
UserResult | $userResult | UserResult object |
Reimplemented in ceLTIc\LTI\DataConnector\DataConnector_mysqli, ceLTIc\LTI\DataConnector\DataConnector_oci8, ceLTIc\LTI\DataConnector\DataConnector_pdo, ceLTIc\LTI\DataConnector\DataConnector_pgsql, and ceLTIc\LTI\DataConnector\DataConnector_sql.
Referenced by saveResourceLinkShareKey().
|
static |
Set/check whether memcached should be used when available.
string | $host | Name or IP address of host running memcache server (use an empty string to disable) |
int | $port | Port number used by memcache server (use -1 for default) |
References loadPlatform().
|
protected |
SQL date format (default = 'Y-m-d')
|
protected |
Database connection.
Referenced by saveTool().
|
protected |
Prefix for database table names.
Referenced by deleteTool(), and saveTool().
|
protected |
SQL time format (default = 'H:i:s')
const ceLTIc\LTI\DataConnector\DataConnector::ACCESS_TOKEN_TABLE_NAME = 'lti2_access_token' |
Default name for database table used to store access token values.
const ceLTIc\LTI\DataConnector\DataConnector::CONTEXT_TABLE_NAME = 'lti2_context' |
Default name for database table used to store contexts.
const ceLTIc\LTI\DataConnector\DataConnector::NONCE_TABLE_NAME = 'lti2_nonce' |
Default name for database table used to store nonce values.
const ceLTIc\LTI\DataConnector\DataConnector::PLATFORM_TABLE_NAME = 'lti2_consumer' |
Default name for database table used to store platforms.
const ceLTIc\LTI\DataConnector\DataConnector::RESOURCE_LINK_SHARE_KEY_TABLE_NAME = 'lti2_share_key' |
Default name for database table used to store resource link share keys.
const ceLTIc\LTI\DataConnector\DataConnector::RESOURCE_LINK_TABLE_NAME = 'lti2_resource_link' |
Default name for database table used to store resource links.
const ceLTIc\LTI\DataConnector\DataConnector::TOOL_TABLE_NAME = 'lti2_tool' |
Default name for database table used to store tools.
const ceLTIc\LTI\DataConnector\DataConnector::USER_RESULT_TABLE_NAME = 'lti2_user_result' |
Default name for database table used to store users.