LTI Tool Provider Library  3.0.2
PHP class library for building LTI Tool Providers
ResourceLinkShareKey Class Reference

Class to represent a tool consumer resource link share key. More...

Public Member Functions

 __construct ($resourceLink, $id=null)
 Class constructor. More...
 
 initialize ()
 Initialise the resource link share key. More...
 
 initialise ()
 Initialise the resource link share key. More...
 
 save ()
 Save the resource link share key to the database. More...
 
 delete ()
 Delete the resource link share key from the database. More...
 
 getId ()
 Get share key value. More...
 

Data Fields

const MAX_SHARE_KEY_LIFE = 168
 Maximum permitted life for a share key value. More...
 
const DEFAULT_SHARE_KEY_LIFE = 24
 Default life for a share key value. More...
 
const MIN_SHARE_KEY_LENGTH = 5
 Minimum length for a share key value. More...
 
const MAX_SHARE_KEY_LENGTH = 32
 Maximum length for a share key value. More...
 
 $resourceLinkId = null
 ID for resource link being shared. More...
 
 $length = null
 Length of share key. More...
 
 $life = null
 Life of share key. More...
 
 $autoApprove = false
 Whether the sharing arrangement should be automatically approved when first used. More...
 
 $expires = null
 Date/time when the share key expires. More...
 

Detailed Description

Class to represent a tool consumer resource link share key.

Author
Stephen P Vickers svick.nosp@m.ers@.nosp@m.imsgl.nosp@m.obal.nosp@m..org
Date
2016
Version
3.0.2
Licence:
http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0

Definition at line 16 of file ResourceLinkShareKey.php.

Constructor & Destructor Documentation

__construct (   $resourceLink,
  $id = null 
)

Class constructor.

Parameters
ResourceLink$resourceLinkResource_Link object
string$idValue of share key (optional, default is null)

Definition at line 86 of file ResourceLinkShareKey.php.

References ResourceLinkShareKey\initialize().

Member Function Documentation

delete ( )

Delete the resource link share key from the database.

Returns
boolean True if the share key was successfully deleted

Definition at line 156 of file ResourceLinkShareKey.php.

getId ( )

Get share key value.

Returns
string Share key value

Definition at line 168 of file ResourceLinkShareKey.php.

References ResourceLinkShareKey\initialize().

initialise ( )

Initialise the resource link share key.

Pseudonym for initialize().

Definition at line 117 of file ResourceLinkShareKey.php.

References ResourceLinkShareKey\initialize().

initialize ( )

Initialise the resource link share key.

Definition at line 102 of file ResourceLinkShareKey.php.

Referenced by ResourceLinkShareKey\__construct(), ResourceLinkShareKey\getId(), and ResourceLinkShareKey\initialise().

save ( )

Save the resource link share key to the database.

Returns
boolean True if the share key was successfully saved

Definition at line 129 of file ResourceLinkShareKey.php.

References DataConnector\getRandomString().

Field Documentation

boolean $autoApprove = false

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

Definition at line 59 of file ResourceLinkShareKey.php.

int $expires = null

Date/time when the share key expires.

Definition at line 65 of file ResourceLinkShareKey.php.

int $length = null

Length of share key.

Definition at line 47 of file ResourceLinkShareKey.php.

int $life = null

Life of share key.

Definition at line 53 of file ResourceLinkShareKey.php.

string $resourceLinkId = null

ID for resource link being shared.

Definition at line 41 of file ResourceLinkShareKey.php.

const DEFAULT_SHARE_KEY_LIFE = 24

Default life for a share key value.

Definition at line 26 of file ResourceLinkShareKey.php.

const MAX_SHARE_KEY_LENGTH = 32

Maximum length for a share key value.

Definition at line 34 of file ResourceLinkShareKey.php.

const MAX_SHARE_KEY_LIFE = 168

Maximum permitted life for a share key value.

Definition at line 22 of file ResourceLinkShareKey.php.

const MIN_SHARE_KEY_LENGTH = 5

Minimum length for a share key value.

Definition at line 30 of file ResourceLinkShareKey.php.


The documentation for this class was generated from the following file: