GeneratedAssetHandler
interface GeneratedAssetHandler (View source)
Interface to define a handler for persistent generated files
Methods
Returns a URL to a generated asset, if one is available.
Returns the content for a generated asset, if one is available.
Update content with new value
Remove any content under the given file.
Details
string
getContentURL(string $filename, callable $callback = null)
Returns a URL to a generated asset, if one is available.
Given a filename, determine if a file is available. If the file is unavailable, and a callback is supplied, invoke it to regenerate the content.
string
getContent(string $filename, callable $callback = null)
Returns the content for a generated asset, if one is available.
Given a filename, determine if a file is available. If the file is unavailable, and a callback is supplied, invoke it to regenerate the content.
setContent(string $filename, string $content)
Update content with new value
removeContent(string $filename)
Remove any content under the given file.
If $filename is a folder, it should delete all files underneath it also.