PHP Class Wicked_Api, horde

This file defines Wicked's external API interface. Other applications can interact with Wicked through this API.
Inheritance: extends Horde_Registry_Api
Show file Open project: horde/horde

Protected Properties

Property Type Description
$_links array Links.

Public Methods

Method Description
display ( string $pagename ) : array Returns a rendered wiki page.
edit ( string $pagename, string $text, string $changelog = '' ) Updates content of a wiki page. If the page does not exist it is created.
getMultiplePageInfo ( array $pagenames = [] ) : array Return basic information for multiple pages.
getPageHistory ( string $pagename ) : array Return page history.
getPageInfo ( string $pagename ) : array Return basic page information.
getPageSource ( $pagename, string $version = null ) : string Get the wiki source of a page specified by its name.
getRecentChanges ( integer $days = 3 ) : array Returns the most recently changed pages.
getTemplate ( string $name ) : string Get a template specified by its name. This is effectively an alias for getPageSource() since Wicked templates are also normal pages.
listPages ( boolean $special = true, boolean $no_cache = false ) : array Returns a list of available pages.
listTemplates ( ) : arrary Get a list of templates provided by Wicked. A template is any page whose name begins with "Template"
pageExists ( string $pagename ) : boolean Chech if a page exists
renderPage ( string $pagename, string $format = 'Plain' ) : array Returns a rendered wiki page.
saveTemplate ( string $name, string $data ) Process a completed template to update the named Wiki page. This method is basically a passthrough to edit().

Method Details

display() public method

Returns a rendered wiki page.
public display ( string $pagename ) : array
$pagename string Page to display
return array Page without CSS link

edit() public method

Updates content of a wiki page. If the page does not exist it is created.
public edit ( string $pagename, string $text, string $changelog = '' )
$pagename string Page to edit
$text string Page content
$changelog string Description of the change

getMultiplePageInfo() public method

Return basic information for multiple pages.
public getMultiplePageInfo ( array $pagenames = [] ) : array
$pagenames array Page names
return array An array of arrays of page parameters.

getPageHistory() public method

Return page history.
public getPageHistory ( string $pagename ) : array
$pagename string Page name
return array An array of page parameters.

getPageInfo() public method

Return basic page information.
public getPageInfo ( string $pagename ) : array
$pagename string Page name
return array An array of page parameters.

getPageSource() public method

Get the wiki source of a page specified by its name.
public getPageSource ( $pagename, string $version = null ) : string
$version string Page version
return string Page data.

getRecentChanges() public method

Returns the most recently changed pages.
public getRecentChanges ( integer $days = 3 ) : array
$days integer The number of days to look back.
return array Pages.

getTemplate() public method

Wicked templates are pages that include "Template" at the beginning of the name.
public getTemplate ( string $name ) : string
$name string The name of the template to fetch
return string Template data.

listPages() public method

Returns a list of available pages.
public listPages ( boolean $special = true, boolean $no_cache = false ) : array
$special boolean Include special pages
$no_cache boolean Always retreive pages from backed
return array An array of all available pages.

listTemplates() public method

Get a list of templates provided by Wicked. A template is any page whose name begins with "Template"
public listTemplates ( ) : arrary
return arrary Array on success.

pageExists() public method

Chech if a page exists
public pageExists ( string $pagename ) : boolean
$pagename string Page name
return boolean

renderPage() public method

Returns a rendered wiki page.
public renderPage ( string $pagename, string $format = 'Plain' ) : array
$pagename string Page to display
$format string Format to render page to (Plain, XHtml)
return array Rendered page

saveTemplate() public method

Process a completed template to update the named Wiki page. This method is basically a passthrough to edit().
public saveTemplate ( string $name, string $data )
$name string Name of the new or modified page
$data string Text content of the populated template

Property Details