function MemoryBackend::getRequestTime

Same name in other branches
  1. 9 core/lib/Drupal/Core/Cache/MemoryBackend.php \Drupal\Core\Cache\MemoryBackend::getRequestTime()
  2. 8.9.x core/lib/Drupal/Core/Cache/MemoryBackend.php \Drupal\Core\Cache\MemoryBackend::getRequestTime()

Wrapper method for REQUEST_TIME constant.

Return value

int

File

core/lib/Drupal/Core/Cache/MemoryBackend.php, line 217

Class

MemoryBackend
Defines a memory cache implementation.

Namespace

Drupal\Core\Cache

Code

protected function getRequestTime() {
    @trigger_error(__METHOD__ . '() is deprecated in drupal:10.3.0 will be removed in drupal:11.0.0. Use the datetime.time service instead. See https://www.drupal.org/node/3387233', E_USER_DEPRECATED);
    return $this->time
        ->getRequestTime();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.