function MTimeProtectedFileStorage::load

Same name in other branches
  1. 9 core/lib/Drupal/Component/PhpStorage/MTimeProtectedFileStorage.php \Drupal\Component\PhpStorage\MTimeProtectedFileStorage::load()
  2. 10 core/lib/Drupal/Component/PhpStorage/MTimeProtectedFileStorage.php \Drupal\Component\PhpStorage\MTimeProtectedFileStorage::load()
  3. 11.x core/lib/Drupal/Component/PhpStorage/MTimeProtectedFileStorage.php \Drupal\Component\PhpStorage\MTimeProtectedFileStorage::load()

Overrides FileStorage::load

File

core/lib/Drupal/Component/PhpStorage/MTimeProtectedFileStorage.php, line 37

Class

MTimeProtectedFileStorage
Stores PHP code in files with securely hashed names.

Namespace

Drupal\Component\PhpStorage

Code

public function load($name) {
    if (($filename = $this->checkFile($name)) !== FALSE) {
        // Inline parent::load() to avoid an expensive getFullPath() call.
        return @(include_once $filename) !== FALSE;
    }
    return FALSE;
}

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