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

Class to represent a platform nonce. More...

Inheritance diagram for PlatformNonce:
ConsumerNonce

Public Member Functions

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

Data Fields

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

Static Public Attributes

static $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

Definition at line 12 of file PlatformNonce.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $platform,
  $value = null 
)

Class constructor.

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

Reimplemented in ConsumerNonce.

Definition at line 56 of file PlatformNonce.php.

Member Function Documentation

◆ delete()

delete ( )

Delete a nonce value in the database.

Returns
bool True if the nonce value was successfully deleted

Definition at line 88 of file PlatformNonce.php.

◆ getPlatform()

getPlatform ( )

Get platform.

Returns
Platform Platform for this nonce

Definition at line 98 of file PlatformNonce.php.

Referenced by ConsumerNonce\getConsumer().

◆ getValue()

getValue ( )

Get nonce value.

Returns
string|null Nonce value

Definition at line 108 of file PlatformNonce.php.

◆ load()

load ( )

Load a nonce value from the database.

Returns
bool True if the nonce value was successfully loaded

Definition at line 68 of file PlatformNonce.php.

◆ save()

save ( )

Save a nonce value in the database.

Returns
bool True if the nonce value was successfully saved

Definition at line 78 of file PlatformNonce.php.

Field Documentation

◆ $expires

int null $expires = null

Timestamp for when the nonce value expires.

Definition at line 34 of file PlatformNonce.php.

◆ $maximumLength

int $maximumLength = 50
static

Maximum length which can be stored.

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

Definition at line 27 of file PlatformNonce.php.

◆ MAX_NONCE_AGE

const MAX_NONCE_AGE = 30

Maximum age nonce values will be retained for (in minutes).

Definition at line 18 of file PlatformNonce.php.


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