LTI Integration Library 5.2.0
PHP class library for building LTI integrations
 
Loading...
Searching...
No Matches
ceLTIc\LTI\ResourceLinkShareKey Class Reference

Class to represent a platform resource link share key. More...

Public Member Functions

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

Public Attributes

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

Detailed Description

Class to represent a platform resource link share key.

Author
Stephen P Vickers steph.nosp@m.en@s.nosp@m.pvsof.nosp@m.twar.nosp@m.eprod.nosp@m.ucts.nosp@m..com
Licence: http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3

Constructor & Destructor Documentation

◆ __construct()

ceLTIc\LTI\ResourceLinkShareKey::__construct ( ResourceLink $resourceLink,
?string $id = null )

Class constructor.

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

References ceLTIc\LTI\Util\getRandomString().

Member Function Documentation

◆ delete()

bool ceLTIc\LTI\ResourceLinkShareKey::delete ( )

Delete the resource link share key from the database.

Returns
bool True if the share key was successfully deleted

◆ getId()

◆ initialise()

void ceLTIc\LTI\ResourceLinkShareKey::initialise ( )

Initialise the resource link share key.

Synonym for initialize().

◆ initialize()

void ceLTIc\LTI\ResourceLinkShareKey::initialize ( )

Initialise the resource link share key.

Referenced by save().

◆ save()

bool ceLTIc\LTI\ResourceLinkShareKey::save ( )

Save the resource link share key to the database.

Returns
bool True if the share key was successfully saved

References initialize().

Member Data Documentation

◆ $autoApprove

bool ceLTIc\LTI\ResourceLinkShareKey::$autoApprove = false

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

◆ $expires

int ceLTIc\LTI\ResourceLinkShareKey::$expires = null

Timestamp for when the share key expires.

◆ $length

int ceLTIc\LTI\ResourceLinkShareKey::$length = null

Length of share key.

◆ $life

int ceLTIc\LTI\ResourceLinkShareKey::$life = null

Life of share key.

◆ $resourceLinkId

int ceLTIc\LTI\ResourceLinkShareKey::$resourceLinkId = null

ID for resource link being shared.

◆ DEFAULT_SHARE_KEY_LIFE

const ceLTIc\LTI\ResourceLinkShareKey::DEFAULT_SHARE_KEY_LIFE = 24

Default life for a share key value.

◆ MAX_SHARE_KEY_LENGTH

const ceLTIc\LTI\ResourceLinkShareKey::MAX_SHARE_KEY_LENGTH = 32

Maximum length for a share key value.

◆ MAX_SHARE_KEY_LIFE

const ceLTIc\LTI\ResourceLinkShareKey::MAX_SHARE_KEY_LIFE = 168

Maximum permitted life for a share key value.

◆ MIN_SHARE_KEY_LENGTH

const ceLTIc\LTI\ResourceLinkShareKey::MIN_SHARE_KEY_LENGTH = 5

Minimum length for a share key value.