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

Class to represent a platform nonce. More...

Public Member Functions

 __construct (Platform $platform, ?string $value=null)
 Class constructor.
 
bool load ()
 Load a nonce value from the database.
 
bool save ()
 Save a nonce value in the database.
 
bool delete ()
 Delete a nonce value in the database.
 
Platform getPlatform ()
 Get platform.
 
string null getValue ()
 Get nonce value.
 

Public Attributes

const MAX_NONCE_AGE = 30
 Maximum age nonce values will be retained for (in minutes).
 
int $expires
 Timestamp for when the nonce value expires.
 

Static Public Attributes

static int $maximumLength = 50
 Maximum length which can be stored.
 

Detailed Description

Class to represent a platform nonce.

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()

__construct ( Platform $platform,
?string $value = null )

Class constructor.

Parameters
Platform$platformPlatform object
string | null$valueNonce value (optional, default is null)

Member Function Documentation

◆ delete()

bool delete ( )

Delete a nonce value in the database.

Returns
bool True if the nonce value was successfully deleted

◆ getPlatform()

Platform getPlatform ( )

Get platform.

Returns
Platform Platform for this nonce

Referenced by DataConnector_oci8\getSharesResourceLink(), and DataConnector_pdo\getSharesResourceLink().

◆ getValue()

string null getValue ( )

Get nonce value.

Returns
string|null Nonce value

Referenced by DataConnector_oci8\getSharesResourceLink(), and DataConnector_pdo\getSharesResourceLink().

◆ load()

bool load ( )

Load a nonce value from the database.

Returns
bool True if the nonce value was successfully loaded

◆ save()

bool save ( )

Save a nonce value in the database.

Returns
bool True if the nonce value was successfully saved

Member Data Documentation

◆ $maximumLength

int $maximumLength = 50
static

Maximum length which can be stored.

Characters are removed from the beginning of the value when too long.