Class to represent a tool consumer resource link share key

author Stephen P Vickers
version 2.5.00
license GNU Lesser General Public License, version 3
package LTI

 Methods

Class constructor.

__construct(\LTI_Resource_Link $resource_link, string $id = NULL

Parameters

$resource_link

\LTI_Resource_Link

Resource_Link object

$id

string

Value of share key (optional, default is null)

Delete the resource link share key from the database.

delete() : boolean

Returns

booleanTrue if the share key was successfully deleted

Get share key value.

getId() : string

Returns

stringShare key value

Initialise the resource link share key.

initialise() 

Save the resource link share key to the database.

save() : boolean

Returns

booleanTrue if the share key was successfully saved

Load the resource link share key from the database.

load() 

 Properties

 

Whether the sharing arrangement should be automatically approved when first used.

$auto_approve : boolean

Default

FALSE
 

Date/time when the share key expires.

$expires : object

Default

NULL
 

Length of share key.

$length : integer

Default

NULL
 

Life of share key.

$life : integer

Default

NULL
 

Consumer key for resource link being shared.

$primary_consumer_key : string

Default

NULL
   

Data connector.

$data_connector : \LTI_Data_Connector

Default

NULL
 

Share key value.

$id : string

Default

NULL

 Constants

 

Default life for a share key value.

DEFAULT_SHARE_KEY_LIFE = 24 
 

Maximum length for a share key value.

MAX_SHARE_KEY_LENGTH = 32 
 

Maximum permitted life for a share key value.

MAX_SHARE_KEY_LIFE = 168 
 

Minimum length for a share key value.

MIN_SHARE_KEY_LENGTH = 5