File/lib/api.php

Description

Wicked external API interface.

This file defines Wicked's external API interface. Other applications can interact with Wicked through this API.

$Horde: wicked/lib/api.php,v 1.30.2.2 2009/01/06 15:28:43 jan Exp $

Copyright 2003-2009 The Horde Project (http://www.horde.org/)

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

Functions
_wicked_display (line 273)

Returns a rendered wiki page.

  • return: Page without CSS link
array _wicked_display (string $pagename)
  • string $pagename: Page to display
_wicked_edit (line 325)

Updates content of a wiki page. If the page does not exist it is created.

  • return: | PEAR_Error True on success, PEAR_Error on failure.
boolean _wicked_edit (string $pagename, string $text, [string $changelog = ''], [boolean $minorchange = false])
  • string $pagename: Page to edit
  • string $text: Page content
  • string $changelog: Description of the change
  • boolean $minorchange: True if this is a minor change
_wicked_getMultiplePageInfo (line 193)

Return basic information for multiple pages.

  • return: An array of arrays of page parameters.
array _wicked_getMultiplePageInfo ([array $pagenames = array()])
  • array $pagenames: Page names
_wicked_getPageHistory (line 231)

Return page history.

  • return: An array of page parameters.
array _wicked_getPageHistory (string $pagename)
  • string $pagename: Page name
_wicked_getPageInfo (line 167)

Return basic page information.

  • return: An array of page parameters.
array _wicked_getPageInfo (string $pagename)
  • string $pagename: Page name
_wicked_getPageSource (line 406)

Get the wiki source of a page specified by its name.

  • return: String of page data on success; PEAR_Error on fail
mixed _wicked_getPageSource ( $pagename, [string $version = null], string $name)
  • string $name: The name of the page to fetch
  • string $version: Page version
  • $pagename
_wicked_getRecentChanges (line 445)

Returns the most recently changed pages.

  • return: An array of pages, or PEAR_Error on failure.
mixed _wicked_getRecentChanges ([integer $days = 3])
  • integer $days: The number of days to look back.
_wicked_getTemplate (line 393)

Get a template specified by its name. This is effectively an alias for getPageSource() since Wicked templates are also normal pages.

Wicked templates are pages that include "Template" at the beginning of the name.

  • return: String of template data on success; PEAR_Error on fail
mixed _wicked_getTemplate (string $name)
  • string $name: The name of the template to fetch
_wicked_list (line 154)

Returns a list of available pages.

  • return: An array of all available pages.
array _wicked_list ([boolean $special = true], [boolean $no_cache = false])
  • boolean $special: Include special pages
  • boolean $no_cache: Always retreive pages from backed
_wicked_listTemplates (line 369)

Get a list of templates provided by Wicked. A template is any page whose name begins with "Template"

  • return: Array on success; PEAR_Error on failure
mixed _wicked_listTemplates ()
_wicked_pageExists (line 260)

Chech if a page exists

boolean _wicked_pageExists (string $pagename)
  • string $pagename: Page name
_wicked_perms (line 103)

Returns a list of available permissions.

  • return: An array describing all available permissions.
array _wicked_perms ()
_wicked_renderPage (line 295)

Returns a rendered wiki page.

  • return: Rendered page
array _wicked_renderPage (string $pagename, [string $format = 'Plain'])
  • string $pagename: Page to display
  • string $format: Format to render page to (Plain, XHtml)
_wicked_saveTemplate (line 433)

Process a completed template to update the named Wiki page. This method is basically a passthrough to _wicked_edit()

  • return: True on success; PEAR_Error on failure
mixed _wicked_saveTemplate (string $name, string $data)
  • string $name: Name of the new or modified page
  • string $data: Text content of the populated template

Documentation generated on Sun, 30 Jan 2011 05:42:54 +0000 by phpDocumentor 1.4.3