You are here

protected function SessionBasedTempStore::expirationTime in Session Based Temporary Storage 8

Returns the date/time that the session store will expire.

Return value

int UNIX time stamp.

1 call to SessionBasedTempStore::expirationTime()
SessionBasedTempStore::getOwner in src/SessionBasedTempStore.php
Gets the current owner based on the current session ID.

File

src/SessionBasedTempStore.php, line 334

Class

SessionBasedTempStore
Stores and retrieves temporary data for a given owner.

Namespace

Drupal\session_based_temp_store

Code

protected function expirationTime() {

  // Allow the cookie to expire at the end of the session.
  if ($this->expire === 0) {
    return $this->expire;
  }

  // Otherwise set the specific expiration time passed in the argument.
  $request_time = (int) $this->requestStack
    ->getMasterRequest()->server
    ->get('REQUEST_TIME');
  return $request_time + $this->expire;
}