Class Wicked_Api
Wicked external API interface.
This file defines Wicked's external API interface. Other applications
can interact with Wicked through this API.
Copyright 2010-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.
-
Horde_Registry_Api
-
Wicked_Api
Methods summary
public
array
|
#
listPages( boolean $special = true, boolean $no_cache = false )
Returns a list of available pages.
Returns a list of available pages.
Parameters
- $special
- Include special pages
- $no_cache
- Always retreive pages from backed
Returns
array An array of all available pages.
|
public
array
|
#
getPageInfo( string $pagename )
Return basic page information.
Return basic page information.
Parameters
Returns
array An array of page parameters.
Throws
|
public
array
|
#
getMultiplePageInfo( array $pagenames = array() )
Return basic information for multiple pages.
Return basic information for multiple pages.
Parameters
Returns
array An array of arrays of page parameters.
Throws
|
public
array
|
#
getPageHistory( string $pagename )
Return page history.
Parameters
Returns
array An array of page parameters.
Throws
|
public
boolean
|
#
pageExists( string $pagename )
Chech if a page exists
Parameters
Returns
boolean
|
public
array
|
#
display( string $pagename )
Returns a rendered wiki page.
Returns a rendered wiki page.
Parameters
- $pagename
- Page to display
Returns
array Page without CSS link
Throws
|
public
array
|
#
renderPage( string $pagename, string $format = 'Plain' )
Returns a rendered wiki page.
Returns a rendered wiki page.
Parameters
- $pagename
- Page to display
- $format
- Format to render page to (Plain, XHtml)
Returns
array Rendered page
Throws
|
public
|
#
edit( string $pagename, string $text, string $changelog = '' )
Updates content of a wiki page. If the page does not exist it is
created.
Updates content of a wiki page. If the page does not exist it is
created.
Parameters
- $pagename
- Page to edit
- $text
- Page content
- $changelog
- Description of the change
Throws
|
public
arrary
|
#
listTemplates( )
Get a list of templates provided by Wicked. A template is any page
whose name begins with "Template"
Get a list of templates provided by Wicked. A template is any page
whose name begins with "Template"
Returns
arrary Array on success.
Throws
|
public
string
|
#
getTemplate( string $name )
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.
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.
Parameters
- $name
- The name of the template to fetch
Returns
string Template data.
Throws
|
public
string
|
#
getPageSource( string $pagename, string $version = null )
Get the wiki source of a page specified by its name.
Get the wiki source of a page specified by its name.
Parameters
- $pagename
- $name The name of the page to fetch
- $version
- Page version
Returns
string Page data.
Throws
|
public
|
#
saveTemplate( string $name, string $data )
Process a completed template to update the named Wiki page. This
method is basically a passthrough to edit().
Process a completed template to update the named Wiki page. This
method is basically a passthrough to edit().
Parameters
- $name
- Name of the new or modified page
- $data
- Text content of the populated template
Throws
|
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.
Throws
|
Properties summary
public
array
|
$links
|
#
array(
'show' => '%application%/display.php?page=|page|&version=|version|#|toc|'
)
|