src/Registry/Adapter/FileSystemAdapter.php
public function save(string $namespace, string $hash, string $content): void
    {
        $fileName = $this->getFileName($namespace, $hash);
        $this->ensureDirectory(dirname($fileName));

        $success = false;
        if (!file_exists($fileName) || is_writable($fileName)) {
            $success = file_put_contents($fileName, $content);
        }
        if ($success === false) {
            throw new ExportDataException('Unable to write file ' . $fileName);
        }
    }
public function save(string $namespace, string $hash, string $content): void
    {
        $fileName = $this->getFileName($namespace, $hash);
        $this->ensureDirectory(dirname($fileName));

        $success = false;
        if (!file_exists($fileName) || is_writable($fileName)) {
            $success = file_put_contents($fileName, $content);
        }
        if ($success === false) {
            throw new ExportDataException('Unable to write file ' . $fileName);
        }
    }
public function save ( string $ namespace , string $ hash , string $ content ) : void { $ fileName = $ this -> getFileName ( $ namespace , $ hash ) ; $ this -> ensureDirectory ( dirname ( $ fileName ) ) ; $ success = false ; if ( ! file_exists ( $ fileName ) || is_writable ( $ fileName ) ) { $ success = file_put_contents ( $ fileName , $ content ) ; } if ( $ success === false ) { throw new ExportDataException ( 'Unable to write file ' . $ fileName ) ; } }
Saves the content under the specified hash.
@param string $namespace
@param string $hash
@param string $content
@return void
@throws ExportDataException
Saves the content under the specified hash .