Wicked_Driver::getAttachmentContents PHP Method

getAttachmentContents() public method

Retrieves the contents of an attachment.
public getAttachmentContents ( string $pageId, string $filename, string $version ) : string
$pageId string This is the name of the page to which the file is attached.
$filename string This is the name of the attachment.
$version string This is the version of the attachment.
return string The file's contents.
    public function getAttachmentContents($pageId, $filename, $version)
    {
        $vfs = $this->getVFS();
        $path = Wicked::VFS_ATTACH_PATH . '/' . $pageId;
        try {
            return $vfs->read($path, $filename . ';' . $version);
        } catch (Horde_Vfs_Exception $e) {
            throw new Wicked_Exception($e);
        }
    }