LTI Integration Library  3.1.0
PHP class library for building LTI integrations
ConsumerNonce Class Reference

Class to represent a tool consumer nonce. More...

Public Member Functions

 __construct ($consumer, $value=null)
 Class constructor. More...
 
 load ()
 Load a nonce value from the database. More...
 
 save ()
 Save a nonce value in the database. More...
 
 getConsumer ()
 Get tool consumer. More...
 
 getValue ()
 Get outcome value. More...
 

Data Fields

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

Static Public Attributes

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

Detailed Description

Class to represent a tool consumer 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
Version
3.1.0
Licence: http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3

Definition at line 13 of file ConsumerNonce.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $consumer,
  $value = null 
)

Class constructor.

Parameters
ToolConsumer$consumerConsumer object
string$valueNonce value (optional, default is null)

Definition at line 57 of file ConsumerNonce.php.

Member Function Documentation

◆ getConsumer()

getConsumer ( )

Get tool consumer.

Returns
ToolConsumer Consumer for this nonce

Definition at line 89 of file ConsumerNonce.php.

◆ getValue()

getValue ( )

Get outcome value.

Returns
string Outcome value

Definition at line 99 of file ConsumerNonce.php.

◆ load()

load ( )

Load a nonce value from the database.

Returns
bool True if the nonce value was successfully loaded

Definition at line 69 of file ConsumerNonce.php.

◆ save()

save ( )

Save a nonce value in the database.

Returns
bool True if the nonce value was successfully saved

Definition at line 79 of file ConsumerNonce.php.

Field Documentation

◆ $expires

int null $expires = null

Timestamp for when the nonce value expires.

Definition at line 35 of file ConsumerNonce.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 28 of file ConsumerNonce.php.

◆ MAX_NONCE_AGE

const MAX_NONCE_AGE = 30

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

Definition at line 19 of file ConsumerNonce.php.


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