function PhpStorageInterface::save
Same name in other branches
- 9 core/lib/Drupal/Component/PhpStorage/PhpStorageInterface.php \Drupal\Component\PhpStorage\PhpStorageInterface::save()
- 8.9.x core/lib/Drupal/Component/PhpStorage/PhpStorageInterface.php \Drupal\Component\PhpStorage\PhpStorageInterface::save()
- 11.x core/lib/Drupal/Component/PhpStorage/PhpStorageInterface.php \Drupal\Component\PhpStorage\PhpStorageInterface::save()
Saves PHP code to storage.
Parameters
string $name: The virtual file name. Can be a relative path.
string $code: The PHP code to be saved.
Return value
bool TRUE if the save succeeded, FALSE if it failed.
2 methods override PhpStorageInterface::save()
- FileReadOnlyStorage::save in core/
lib/ Drupal/ Component/ PhpStorage/ FileReadOnlyStorage.php - Saves PHP code to storage.
- FileStorage::save in core/
lib/ Drupal/ Component/ PhpStorage/ FileStorage.php - Saves PHP code to storage.
File
-
core/
lib/ Drupal/ Component/ PhpStorage/ PhpStorageInterface.php, line 52
Class
- PhpStorageInterface
- Stores and loads PHP code.
Namespace
Drupal\Component\PhpStorageCode
public function save($name, $code);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.