$_params
$_params : array
Hash containing connection parameters.
Wicked_Driver defines an API for implementing storage backends for Wicked.
getAttachedFiles(string $pageId, boolean $allversions = false) : array
Retrieves data on files attached to a page.
string | $pageId | This is the Id of the page for which we'd like to find attached files. |
boolean | $allversions | Whether to include all versions. If false or omitted, only the most recent version of each attachment is returned. |
An array of key/value arrays describing the attached files.
attachFile(array $file, string $data)
Attaches a file to a page or update an attachment.
array | $file | This is a key/value array describing the attachment: 'page_id' => This is the id of the page to which we would like to attach the file. 'attachment_name' => This is the filename of the attachment. 'change_log' => A change log entry for this attach or update operation. (Optional) 'change_author' => The user uploading this file. If not present, the currently logged-in user is assumed. |
string | $data | This is the contents of the file to be attached. |
removeAttachment(integer $pageId, string $attachment, string $version = null)
Remove a single version or all versions of an attachment to $pageId from the VFS backend.
integer | $pageId | The Id of the page the file is attached to. |
string | $attachment | The name of the file. |
string | $version | If specified, the version to delete. If null, then all versions of $attachment will be removed. |
getAttachmentContents(string $pageId, string $filename, string $version) : string
Retrieves the contents of an attachment.
string | $pageId | This is the name of the page to which the file is attached. |
string | $filename | This is the name of the attachment. |
string | $version | This is the version of the attachment. |
The file's contents.
_attachFile(array $file) : boolean
Handles the driver-specific portion of attaching a file.
Wicked_Driver::attachFile() calls down to this method for the driver- specific portion, and then uses VFS to store the attachment.
array | $file | See Wicked_Driver::attachFile(). |
The new version of the file attached