public function 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 drupal/core/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php
Implements Drupal\Component\PhpStorage\PhpStorageInterface::save().
FileStorage::save in drupal/core/lib/Drupal/Component/PhpStorage/FileStorage.php
Implements Drupal\Component\PhpStorage\PhpStorageInterface::save().

File

drupal/core/lib/Drupal/Component/PhpStorage/PhpStorageInterface.php, line 57
Definition of Drupal\Component\PhpStorage\PhpStorageInterface.

Class

PhpStorageInterface
Stores and loads PHP code.

Namespace

Drupal\Component\PhpStorage

Code

public function save($name, $code);