Wicked_Driver::getAttachmentContents PHP 메소드

getAttachmentContents() 공개 메소드

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.
리턴 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);
        }
    }