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

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

Public Member Functions

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

Data Fields

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.
 
 $resourceLinkId = null
 ID for resource link being shared.
 
 $length = null
 Length of share key.
 
 $life = null
 Life of share key.
 
 $autoApprove = false
 Whether the sharing arrangement should be automatically approved when first used.
 
 $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

Definition at line 14 of file ResourceLinkShareKey.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $resourceLink,
  $id = null 
)

Class constructor.

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

Definition at line 92 of file ResourceLinkShareKey.php.

References ResourceLinkShareKey\initialize().

Member Function Documentation

◆ delete()

delete ( )

Delete the resource link share key from the database.

Returns
bool True if the share key was successfully deleted

Definition at line 155 of file ResourceLinkShareKey.php.

◆ getId()

getId ( )

Get share key value.

Returns
string Share key value

Definition at line 165 of file ResourceLinkShareKey.php.

◆ initialise()

initialise ( )

Initialise the resource link share key.

Synonym for initialize().

Definition at line 120 of file ResourceLinkShareKey.php.

References ResourceLinkShareKey\initialize().

◆ initialize()

initialize ( )

Initialise the resource link share key.

Definition at line 107 of file ResourceLinkShareKey.php.

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

◆ save()

save ( )

Save the resource link share key to the database.

Returns
bool True if the share key was successfully saved

Definition at line 130 of file ResourceLinkShareKey.php.

References ResourceLinkShareKey\DEFAULT_SHARE_KEY_LIFE, Util\getRandomString(), and ResourceLinkShareKey\MAX_SHARE_KEY_LENGTH.

Field Documentation

◆ $autoApprove

bool $autoApprove = false

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

Definition at line 63 of file ResourceLinkShareKey.php.

◆ $expires

int null $expires = null

Timestamp for when the share key expires.

Definition at line 70 of file ResourceLinkShareKey.php.

◆ $length

int null $length = null

Length of share key.

Definition at line 49 of file ResourceLinkShareKey.php.

◆ $life

int null $life = null

Life of share key.

Definition at line 56 of file ResourceLinkShareKey.php.

◆ $resourceLinkId

int null $resourceLinkId = null

ID for resource link being shared.

Definition at line 42 of file ResourceLinkShareKey.php.

◆ DEFAULT_SHARE_KEY_LIFE

const DEFAULT_SHARE_KEY_LIFE = 24

Default life for a share key value.

Definition at line 25 of file ResourceLinkShareKey.php.

Referenced by ResourceLinkShareKey\save().

◆ MAX_SHARE_KEY_LENGTH

const MAX_SHARE_KEY_LENGTH = 32

Maximum length for a share key value.

Definition at line 35 of file ResourceLinkShareKey.php.

Referenced by ResourceLinkShareKey\save().

◆ MAX_SHARE_KEY_LIFE

const MAX_SHARE_KEY_LIFE = 168

Maximum permitted life for a share key value.

Definition at line 20 of file ResourceLinkShareKey.php.

◆ MIN_SHARE_KEY_LENGTH

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: