Property | Type | Description | |
---|---|---|---|
$_params | array | Hash containing connection parameters. | |
$_vfs | VFS | VFS object for storing attachments. |
Method | Description | |
---|---|---|
__construct ( array $params = [] ) | Constructor. | |
attachFile ( array $file, string $data ) | Attaches a file to a page or update an attachment. | |
getAllPages ( ) | ||
getAttachedFiles ( string $pageId, boolean $allversions = false ) : array | Retrieves data on files attached to a page. | |
getAttachmentContents ( string $pageId, string $filename, string $version ) : string | Retrieves the contents of an attachment. | |
getBackLinks ( $pagename ) | ||
getCharset ( ) : string | Returns the charset used by the backend. | |
getHistory ( $pagename ) | ||
getLikePages ( $pagename ) | ||
getPage ( $pagename ) | ||
getPageById ( $id ) | ||
getPageId ( $pagename ) | ||
getPages ( $special = true ) | ||
getRecentChanges ( integer $days = 3 ) : array | Returns the most recently changed pages. | |
getSpecialPages ( ) | ||
getVFS ( ) | Accessor to manage a VFS instance. | |
leastPopular ( integer $limit = 10 ) : array | Returns the least popular pages. | |
logPageView ( string $pagename ) | Logs a hit to $pagename. | |
mostPopular ( integer $limit = 10 ) : array | Returns the most popular pages. | |
mostRecent ( integer $limit = 10 ) : array | Returns the most recently changed pages. | |
newPage ( string $pagename, string $text ) | Creates a new page. | |
pageExists ( $pagename ) | ||
removeAllAttachments ( integer $pageId ) | Removes all attachments to $pageId from the VFS backend. | |
removeAllVersions ( $pagename ) | ||
removeAttachment ( integer $pageId, string $attachment, string $version = null ) | Remove a single version or all versions of an attachment to $pageId from the VFS backend. | |
removeVersion ( $pagename, $version ) | ||
renamePage ( $pagename, $newname ) | ||
retrieveByName ( string $pagename ) | Retrieves the page of a particular name from the database. | |
retrieveHistory ( string $pagename, string $version ) | Retrieves a historic version of a page. | |
searchText ( string $searchtext ) : array | Finds pages with matches in text or title. | |
searchTitles ( $searchtext, $begin = false ) | ||
updateText ( $pagename, $text, $changelog ) |
Method | Description | |
---|---|---|
_attachFile ( array $file ) : boolean | Handles the driver-specific portion of attaching a file. |
public __construct ( array $params = [] ) | ||
$params | array | A hash containing connection parameters. |
abstract protected _attachFile ( array $file ) : boolean | ||
$file | array | See Wicked_Driver::attachFile(). |
return | boolean | The new version of the file attached |
public attachFile ( array $file, string $data ) | ||
$file | array | 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. |
$data | string | This is the contents of the file to be attached. |
abstract public getAttachedFiles ( string $pageId, boolean $allversions = false ) : array | ||
$pageId | string | This is the Id of the page for which we'd like to find attached files. |
$allversions | boolean | Whether to include all versions. If false or omitted, only the most recent version of each attachment is returned. |
return | array | An array of key/value arrays describing the attached files. |
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 getCharset ( ) : string | ||
return | string | The backend's charset |
abstract public getRecentChanges ( integer $days = 3 ) : array | ||
$days | integer | The number of days to look back. |
return | array | Pages. |
abstract public leastPopular ( integer $limit = 10 ) : array | ||
$limit | integer | The number of least popular pages to return. |
return | array | Pages. |
abstract public logPageView ( string $pagename ) | ||
$pagename | string | The page that was viewed. |
abstract public mostPopular ( integer $limit = 10 ) : array | ||
$limit | integer | The number of most popular pages to return. |
return | array | Pages. |
abstract public mostRecent ( integer $limit = 10 ) : array | ||
$limit | integer | The number of most recent pages to return. |
return | array | Pages. |
public removeAllAttachments ( integer $pageId ) | ||
$pageId | integer | The Id of the page to remove attachments from. |
public removeAttachment ( integer $pageId, string $attachment, string $version = null ) | ||
$pageId | integer | The Id of the page the file is attached to. |
$attachment | string | The name of the file. |
$version | string | If specified, the version to delete. If null, then all versions of $attachment will be removed. |
abstract public retrieveByName ( string $pagename ) | ||
$pagename | string | The name of the page to retrieve |
abstract public retrieveHistory ( string $pagename, string $version ) | ||
$pagename | string | The name of the page to retrieve. |
$version | string | The version to retrieve. |
abstract public searchText ( string $searchtext ) : array | ||
$searchtext | string | The search expression (Google-like). |
return | array | A list of pages |
protected array $_params | ||
return | array |