42 private $consumer =
null;
49 private $value =
null;
59 $this->consumer = $consumer;
60 $this->value = substr($value, -self::$maximumLength);
61 $this->expires = time() + (self::MAX_NONCE_AGE * 60);
71 return $this->consumer->getDataConnector()->loadConsumerNonce($this);
81 return $this->consumer->getDataConnector()->saveConsumerNonce($this);
91 return $this->consumer;
__construct($consumer, $value=null)
Class constructor.
$expires
Timestamp for when the nonce value expires.
save()
Save a nonce value in the database.
static $maximumLength
Maximum length which can be stored.
getConsumer()
Get tool consumer.
Class to represent a tool consumer nonce.
load()
Load a nonce value from the database.
getValue()
Get outcome value.
const MAX_NONCE_AGE
Maximum age nonce values will be retained for (in minutes).