Constructs a new Wicked driver object.
Wicked_Driver
Wicked_Driver
([array $params = array()])
-
array
$params: A hash containing connection parameters.
Attaches a file to a page or update an attachment.
boolean
attachFile
(array $file, string $data)
-
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.
'minor' => This is a boolean which indicates whether this
is a minor version update.
'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.
Attempts to return a concrete Wicked_Driver instance based on $driver.
mixed
factory
([string $driver = null], [array $params = null])
-
string
$driver: The type of the concrete Wicked_Driver subclass to return.
-
array
$params: A hash containing any additional configuration or connection parameters a subclass might need.
void
getAllPages
()
Redefined in descendants as:
Retrieves data on files attached to a page.
mixed
getAttachedFiles
(string $pageId, [boolean $allversions = false])
-
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.
Redefined in descendants as:
Retrieves the contents of an attachment.
string
getAttachmentContents
(string $pageId, string $filename, string $version)
-
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.
void
getBackLinks
( $pagename)
Redefined in descendants as:
Returns the charset used by the backend.
string
getCharset
()
Redefined in descendants as:
void
getHistory
( $pagename)
Redefined in descendants as:
void
getLikePages
( $pagename)
Redefined in descendants as:
void
getPage
( $pagename)
Redefined in descendants as:
void
getPageById
( $id)
Redefined in descendants as:
void
getPageId
( $pagename)
void
getPages
([ $special = true])
Redefined in descendants as:
Returns the most recently changed pages.
mixed
getRecentChanges
([integer $days = 3])
-
integer
$days: The number of days to look back.
Redefined in descendants as:
Accessor to manage a VFS instance.
void
&getVFS
()
Returns the least popular pages.
mixed
leastPopular
([integer $limit = 10])
-
integer
$limit: The number of least popular pages to return.
Redefined in descendants as:
Logs a hit to $pagename.
boolean
logPageView
(string $pagename)
-
string
$pagename: The page that was viewed.
Redefined in descendants as:
Returns the most popular pages.
mixed
mostPopular
([integer $limit = 10])
-
integer
$limit: The number of most popular pages to return.
Redefined in descendants as:
Creates a new page.
mixed
newPage
(string $pagename, string $text)
-
string
$pagename: The new page's name.
-
string
$text: The new page's text.
Redefined in descendants as:
void
pageExists
( $pagename)
Removes all attachments to $pageId from the VFS backend.
boolean|PEAR_Error
removeAllAttachments
(integer $pageId)
-
integer
$pageId: The Id of the page to remove attachments from.
Redefined in descendants as:
void
removeAllVersions
( $pagename)
Redefined in descendants as:
Remove a single version or all versions of an attachment to $pageId from the VFS backend.
boolean|PEAR_Error
removeAttachment
(integer $pageId, string $attachment, [string $version = null])
-
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.
Redefined in descendants as:
void
removeVersion
( $pagename, $version)
Redefined in descendants as:
void
renamePage
( $pagename, $newname)
Redefined in descendants as:
Retrieves the page of a particular name from the database.
boolean
retrieveByName
(string $pagename)
-
string
$pagename: The name of the page to retrieve
Redefined in descendants as:
Retrieves a historic version of a page.
array
retrieveHistory
(string $pagename, string $version)
-
string
$pagename: The name of the page to retrieve.
-
string
$version: The version to retrieve.
Redefined in descendants as:
Finds pages with matches in text or title.
array
searchText
(string $searchtext)
-
string
$searchtext: The search expression (Google-like).
Redefined in descendants as:
void
searchTitles
( $searchtext)
Redefined in descendants as:
void
updateText
( $pagename, $text, $changelog, $minorchange)
-
$pagename
-
$text
-
$changelog
-
$minorchange
Redefined in descendants as:
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.
boolean
_attachFile
(array $file)
-
array
$file: See Wicked_Driver::attachFile().
Redefined in descendants as: