function FileReadOnlyStorage::load

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

Overrides PhpStorageInterface::load

File

core/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php, line 41

Class

FileReadOnlyStorage
Reads code as regular PHP files, but won't write them.

Namespace

Drupal\Component\PhpStorage

Code

public function load($name) {
    // The FALSE returned on failure is enough for the caller to handle this,
    // we do not want a warning too.
    return @(include_once $this->getFullPath($name)) !== FALSE;
}

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