// 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;
} /**
* {@inheritdoc}
*/
public function save($name,
$code) { $path =
$this->
getFullPath($name);
$directory =
dirname($path);
$this->
ensureDirectory($directory);
return (bool) file_put_contents($path,
$code);
} /**
* Ensures the directory exists, has the right permissions, and a .htaccess.
*
* For compatibility with open_basedir, the requested directory is created
* using a recursion logic that is based on the relative directory path/tree:
* It works from the end of the path recursively back towards the root
* directory, until an existing parent directory is found. From there, the
* subdirectories are created.
*
* @param string $directory
* The directory path.
* @param int $mode
* The mode, permissions, the directory should have.
*/