Arbit - project tracking

Arbit - project tracking

API documentation :: Docs For Class arbitCouchDbWikiPageFacade

Wiki::Facade::arbitCouchDbWikiPageFacade

Class arbitCouchDbWikiPageFacade

Page facade defining all methods required to access page related data in the backend.

Page facade defining all methods required to access page related data in the backend.

Implements interfaces:

arbitCouchDbFacadeBase
   |
   --arbitCouchDbWikiPageFacade
Author(s):
Version:   $Revision: 1236 $
License:   GPL

Inherited Member Variables

From arbitCouchDbFacadeBase
protected arbitCouchDbFacadeBase::$connected
protected arbitCouchDbFacadeBase::$manager

Method Summary

public void attachFile( $id , $fileName , $mimeType )
Attach file to page Attach a file to the page specified by its ID. given as a third parameter and should also be stored.
public mixed createPage( $namespace , $title )
Create a new page Create a new page with the given name. if there already is a page with the given name.
public void deletePage( $id )
Delete a page Delete the page with the given ID permanently from the backend.
public mixed findByTitle( $namespace , $title )
Find wiki page by title Find wiki page by its title and return the ID of the wiki page, or false, if it does not exist.
public string getFileContents( $id , $fileName )
Get file contents Return the contents of the file specified by its storage file name.
public int getPageCount( $namespace )
Get page count Get the number of wiki pages in the curretn namespace.
public array getPageData( $page )
Get page data
public array lastEdits( $namespace , [ $offset = 0] , [ $limit = 25] )
Last wiki edits Get a list of document IDs, which were edited last, sorted by the edit date, descending.
public void updatePageData( $page , $data )
Update stored information for the given page The array with the information to update may any number of the common keys, and only the given keys will be updated in the storage backend.

Inherited Methods

From arbitCouchDbFacadeBase
public void arbitCouchDbFacadeBase::__construct()
Constructor The constructor ensures the correct configuration for the conenction by connecting on the first request to on of the facde classes.

Methods

attachFile

void attachFile( mixed $id , string $fileName , string $mimeType )

Attach file to page Attach a file to the page specified by its ID. given as a third parameter and should also be stored.

Attach file to page Attach a file to the page specified by its ID. The files mime type is given as a third parameter and should also be stored.

Parameters:
Name Type Description
$id mixed
$fileName string
$mimeType string
Implementation of:
Method Description
arbitWikiPageFacade::attachFile() Attach file to page Attach a file to the page specified by its ID. given as a third parameter and should also be stored.

createPage

mixed createPage( string $namespace , string $title )

Create a new page Create a new page with the given name. if there already is a page with the given name.

Create a new page Create a new page with the given name. An exception will be thrown if there already is a page with the given name. The ID generated by the backend in some way is returned for later reference. The type of the identifier depends on the backend, no assumptions should be made here.

Parameters:
Name Type Description
$namespace string
$title string
Implementation of:
Method Description
arbitWikiPageFacade::createPage() Create a new page Create a new page with the given name. if there already is a page with the given name.

deletePage

void deletePage( string $id )

Delete a page Delete the page with the given ID permanently from the backend.

Delete a page Delete the page with the given ID permanently from the backend.

Parameters:
Name Type Description
$id string
Implementation of:
Method Description
arbitWikiPageFacade::deletePage() Delete a page Delete the page with the given ID permanently from the backend.

findByTitle

mixed findByTitle( string $namespace , string $title )

Find wiki page by title Find wiki page by its title and return the ID of the wiki page, or false, if it does not exist.

Find wiki page by title Find wiki page by its title and return the ID of the wiki page, or false, if it does not exist.

Parameters:
Name Type Description
$namespace string
$title string
Implementation of:
Method Description
arbitWikiPageFacade::findByTitle() Find wiki page by title Find wiki page by its title and return the ID of the wiki page, or false, if it does not exist.

getFileContents

string getFileContents( mixed $id , string $fileName )

Get file contents Return the contents of the file specified by its storage file name.

Get file contents Return the contents of the file specified by its storage file name.

Parameters:
Name Type Description
$id mixed
$fileName string
Implementation of:
Method Description
arbitWikiPageFacade::getFileContents() Get file contents Return the contents of the file specified by its storage file name.

getPageCount

int getPageCount( string $namespace )

Get page count Get the number of wiki pages in the curretn namespace.

Get page count Get the number of wiki pages in the curretn namespace.

Parameters:
Name Type Description
$namespace string
Implementation of:
Method Description
arbitWikiPageFacade::getPageCount() Get page count Get the number of wiki pages in the curretn namespace.

getPageData

array getPageData( string $page )

Get page data

Get page data Get data for the given page id. The data should be returned as an array, and should contain the following keys:

  • id
  • namespace
  • title
  • author
  • ip
  • edited
  • text
  • source
  • message
  • revisions
  • attachments

Parameters:
Name Type Description
$page string
Implementation of:
Method Description
arbitWikiPageFacade::getPageData() Get page data

lastEdits

array lastEdits( string $namespace , [int $offset = 0] , [int $limit = 25] )

Last wiki edits Get a list of document IDs, which were edited last, sorted by the edit date, descending.

Last wiki edits Get a list of document IDs, which were edited last, sorted by the edit date, descending.

Parameters:
Name Type Description
$namespace string
$offset int
$limit int
Implementation of:
Method Description
arbitWikiPageFacade::lastEdits() Last wiki edits Get a list of document IDs, which were edited last, sorted by the edit date, descending.

updatePageData

void updatePageData( string $page , array $data )

Update stored information for the given page The array with the information to update may any number of the common keys, and only the given keys will be updated in the storage backend.

Update stored information for the given page The array with the information to update may any number of the common keys, and only the given keys will be updated in the storage backend.

Parameters:
Name Type Description
$page string
$data array
Implementation of:
Method Description
arbitWikiPageFacade::updatePageData() Update stored information for the given page The array with the information to update may any number of the common keys, and only the given keys will be updated in the storage backend.
Documentation generated on Mon, 05 Apr 2010 14:02:09 +0200 by phpDocumentor 1.4.3