SilverStripe\Assets\Flysystem\FlysystemAssetStore::writeWithCallback
Invokes the conflict resolution scheme on the given content, and invokes a callback if the storage request is approved.
Signature
protected function writeWithCallback(callable
$callback,
string
$filename,
string
$hash,
[string
$variant = NULL,
[array
$config = ]] )
Parameters
$callback
—
object
- Will be invoked and passed a fileID if the file should be stored
$filename
—
string
- Name for the resulting file
$hash
—
string
- SHA1 of the original file content
$variant
—
string
- Variant to write
$config
—
array
- Write options. {@see AssetStore}
Returns
- array
- Tuple associative array (Filename, Hash, Variant)
Errors/Exceptions
-
Exception