Overview

Packages

  • None
  • Wicked

Classes

  • Text_Wiki_Parse_Heading2
  • Text_Wiki_Parse_Toc2
  • Text_Wiki_Render_Latex_Heading2
  • Text_Wiki_Render_Latex_Toc2
  • Text_Wiki_Render_Plain_Heading2
  • Text_Wiki_Render_Plain_Toc2
  • Text_Wiki_Render_Rst
  • Text_Wiki_Render_Rst_Blockquote
  • Text_Wiki_Render_Rst_Bold
  • Text_Wiki_Render_Rst_Code
  • Text_Wiki_Render_Rst_Deflist
  • Text_Wiki_Render_Rst_Emphasis
  • Text_Wiki_Render_Rst_Freelink
  • Text_Wiki_Render_Rst_Heading2
  • Text_Wiki_Render_Rst_Links
  • Text_Wiki_Render_Rst_List
  • Text_Wiki_Render_Rst_Newline
  • Text_Wiki_Render_Rst_Paragraph
  • Text_Wiki_Render_Rst_Raw
  • Text_Wiki_Render_Rst_Toc2
  • Text_Wiki_Render_Rst_Tt
  • Text_Wiki_Render_Rst_Url
  • Text_Wiki_Render_Xhtml_Attribute
  • Text_Wiki_Render_Xhtml_Code2
  • Text_Wiki_Render_Xhtml_Freelink2
  • Text_Wiki_Render_Xhtml_Heading2
  • Text_Wiki_Render_Xhtml_Image2
  • Text_Wiki_Render_Xhtml_Interwiki
  • Text_Wiki_Render_Xhtml_Registrylink
  • Text_Wiki_Render_Xhtml_Toc2
  • Text_Wiki_Render_Xhtml_Url
  • Text_Wiki_Render_Xhtml_Wickedblock
  • Text_Wiki_Render_Xhtml_Wikilink2
  • Wicked
  • Wicked_Api
  • Wicked_Driver
  • Wicked_Driver_Sql
  • Wicked_Exception
  • Wicked_Factory_Driver
  • Wicked_Page
  • Wicked_Page_AddPage
  • Wicked_Page_AllPages
  • Wicked_Page_AttachedFiles
  • Wicked_Page_BackLinks
  • Wicked_Page_DeletePage
  • Wicked_Page_EditPage
  • Wicked_Page_LeastPopular
  • Wicked_Page_LikePages
  • Wicked_Page_MergeOrRename
  • Wicked_Page_MostPopular
  • Wicked_Page_NewPage
  • Wicked_Page_RecentChanges
  • Wicked_Page_RevertPage
  • Wicked_Page_Search
  • Wicked_Page_StandardHistoryPage
  • Wicked_Page_StandardPage
  • Wicked_Page_SyncDiff
  • Wicked_Page_SyncPages
  • Wicked_Sync
  • Wicked_Sync_Wicked
  • Wicked_Test
  • Overview
  • Package
  • Class
  • Tree

Class Wicked_Driver

Wicked_Driver defines an API for implementing storage backends for Wicked.

Copyright 2003-2012 Horde LLC (http://www.horde.org/)

See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.

Direct known subclasses

Wicked_Driver_Sql
Abstract
Package: Wicked
Author: Tyler Colbert tyler@colberts.us
Located at Driver.php
Methods summary
public
# __construct( array $params = array() )

Constructor.

Constructor.

Parameters

$params
A hash containing connection parameters.
public
# getVFS( )

Accessor to manage a VFS instance.

Accessor to manage a VFS instance.

Throws

Wicked_Exception
abstract public
# retrieveByName( string $pagename )

Retrieves the page of a particular name from the database.

Retrieves the page of a particular name from the database.

Parameters

$pagename
The name of the page to retrieve
abstract public
# retrieveHistory( string $pagename, string $version )

Retrieves a historic version of a page.

Retrieves a historic version of a page.

Parameters

$pagename
The name of the page to retrieve.
$version
The version to retrieve.
abstract public
# logPageView( string $pagename )

Logs a hit to $pagename.

Logs a hit to $pagename.

Parameters

$pagename
The page that was viewed.
abstract public
# newPage( string $pagename, string $text )

Creates a new page.

Creates a new page.

Parameters

$pagename
The new page's name.
$text
The new page's text.
abstract public
# updateText( mixed $pagename, mixed $text, mixed $changelog )
abstract public
# renamePage( mixed $pagename, mixed $newname )
public
# getPageId( mixed $pagename )
public
# getPage( mixed $pagename )
public
# getPageById( mixed $id )
public
# getSpecialPages( )
public
# getPages( mixed $special = true )
public
# pageExists( mixed $pagename )
abstract public
# getAllPages( )
abstract public
# getHistory( mixed $pagename )
abstract public array
# getRecentChanges( integer $days = 3 )

Returns the most recently changed pages.

Returns the most recently changed pages.

Parameters

$days
The number of days to look back.

Returns

array
Pages.
abstract public array
# mostPopular( integer $limit = 10 )

Returns the most popular pages.

Returns the most popular pages.

Parameters

$limit
The number of most popular pages to return.

Returns

array
Pages.
abstract public array
# leastPopular( integer $limit = 10 )

Returns the least popular pages.

Returns the least popular pages.

Parameters

$limit
The number of least popular pages to return.

Returns

array
Pages.
abstract public array
# searchText( string $searchtext )

Finds pages with matches in text or title.

Finds pages with matches in text or title.

Parameters

$searchtext
The search expression (Google-like).

Returns

array
A list of pages
abstract public
# getBackLinks( mixed $pagename )
abstract public
# getLikePages( mixed $pagename )
abstract public array
# getAttachedFiles( string $pageId, boolean $allversions = false )

Retrieves data on files attached to a page.

Retrieves data on files attached to a page.

Parameters

$pageId
<p>This is the Id of the page for which we'd like to find attached files.</p>
$allversions
<p>Whether to include all versions. If false or omitted, only the most recent version of each attachment is returned.</p>

Returns

array

An array of key/value arrays describing the attached files.

public
# attachFile( array $file, string $data )

Attaches a file to a page or update an attachment.

Attaches a file to a page or update an attachment.

Parameters

$file
<p>This is a key/value array describing the attachment:</p> <pre><span class="php-quote">'page_id'</span> =&gt; This is the id of the page to which we would like to attach the <span class="php-keyword2">file</span>. <span class="php-quote">'attachment_name'</span> =&gt; This is the filename of the attachment. <span class="php-quote">'change_log'</span> =&gt; A change <span class="php-keyword2">log</span> entry <span class="php-keyword1">for</span> this attach <span class="php-keyword1">or</span> update operation. (Optional) <span class="php-quote">'change_author'</span> =&gt; The user uploading this <span class="php-keyword2">file</span>. <span class="php-keyword1">If</span> not present, the currently logged-in user is assumed.</pre>
$data
This is the contents of the file to be attached.

Throws

Wicked_Exception
public
# removeAttachment( integer $pageId, string $attachment, string $version = null )

Remove a single version or all versions of an attachment to $pageId from the VFS backend.

Remove a single version or all versions of an attachment to $pageId from the VFS backend.

Parameters

$pageId
The Id of the page the file is attached to.
$attachment
The name of the file.
$version
<p>If specified, the version to delete. If null, then all versions of $attachment will be removed.</p>

Throws

Wicked_Exception
public
# removeAllAttachments( integer $pageId )

Removes all attachments to $pageId from the VFS backend.

Removes all attachments to $pageId from the VFS backend.

Parameters

$pageId
The Id of the page to remove attachments from.

Throws

Wicked_Exception
public string
# getAttachmentContents( string $pageId, string $filename, string $version )

Retrieves the contents of an attachment.

Retrieves the contents of an attachment.

Parameters

$pageId
<p>This is the name of the page to which the file is attached.</p>
$filename
This is the name of the attachment.
$version
This is the version of the attachment.

Returns

string
The file's contents.

Throws

Wicked_Exception
abstract public
# removeVersion( mixed $pagename, mixed $version )
public
# removeAllVersions( mixed $pagename )
abstract public
# searchTitles( mixed $searchtext )
public string
# getCharset( )

Returns the charset used by the backend.

Returns the charset used by the backend.

Returns

string
The backend's charset
API documentation generated by ApiGen