Arbit - project tracking

Arbit - project tracking

API documentation :: Docs For Class arbitModuleModelWikiPage

Wiki::Model::arbitModuleModelWikiPage

Class arbitModuleModelWikiPage

Project model

Project model

arbitBaseStruct
   |
   --arbitModelBase
      |
      --arbitModuleModelWikiPage
Author(s):
Version:   $Revision: 1236 $
License:   GPL

Member Variables

protected string $defaultFetchMethod = 'getPageData'
Method from the model class implementation used to fetch the requested data value for the constructed model. the data is actually requested from the model.

Method from the model class implementation used to fetch the requested data value for the constructed model. The method is called lazy, when the data is actually requested from the model. The here given method is used, when there is nor special callback defined in the $specialFetchMethods array.

protected array $properties = array(
'id' => null,
'namespace' => null,
'title' => null,
'edited' => null,
'author' => null,
'ip' => null,
'text' => null,
'source' => 'rst',
'message' => null,
'revisions' => null,
'attachments' => null,
)

Array containing the projects properties

Array containing the projects properties

protected array $userModelProperties = array(
'author',
'assigned',
)

Properties containing user IDs Properties containing user IDs, which should be transformed into user models. current model, all properties with this name are also transformed.

Properties containing user IDs Properties containing user IDs, which should be transformed into user models. If the revision property is set with older revisions of the current model, all properties with this name are also transformed.

Inherited Member Variables

From arbitModelBase
protected arbitModelBase::$id
protected arbitModelBase::$modifiedProperty
protected arbitModelBase::$specialFetchMethods
protected arbitModelBase::$static

Method Summary

public static array diff( $from , $to )
Diff two wiki pages Calculate the diff between two wiki pages.
public static mixed findByTitle( $namespace , $title )
Find wiki page by title Return the wiki page with the specified title, or false, when no wiki page with the defined title could be found.
public static array getLastEdits( $namespace , [ $skip = 0] )
Get last edited documents Get an array with the documents, edited last.
public static array getPageCount( $namespace )
Get count of available pages
public void attachFile( $name , $fileName , [ $info = array()] )
Attach file to page
public mixed create( )
Method called to create a new instance in the backend.
protected arbitModuleModelWikiPage createFromRevision( $id , $data )
Create model from revision data Create a arbitModuleModelWikiPage from the array containing the data of one revision.
public void delete( )
Method called to delete a instance in the backend.
public string getAttachment( $name )
Get attachment contents Return the contents of the attachment specified by its storage file name.
protected void getPageData( )
Fetch the basic project data
public arbitModuleModelWikiPage getVersion( $version )
Get specified version of wiki page Return a arbitModuleModelWikiPage object for the specified version of the current wiki page.
public void storeChanges( )
Method called to store changes to the model.

Inherited Methods

From arbitModelBase
public void arbitModelBase::__construct()
Create model from identifier If the identifier of the model is known from somewhere in the application you may set it directly here instead of searching for some value.
public abstract void arbitModelBase::create()
Method called to create a new instance in the backend.
protected array arbitModelBase::getModifiedValues()
Return modified values Return an array with all values which has been modified on the current model instance, with their new values.
public abstract void arbitModelBase::storeChanges()
Method called to store changes to the model.
protected mixed arbitModelBase::toUserModel()
Transform value to user model(s) Transform a user ID or an array with user IDs in the a user mdoel, or an array of user models.
protected array arbitModelBase::transformUserProperties()
Transform all user properties Transform all iser IDs in the declared user properties into user models.
From arbitBaseStruct
protected void arbitBaseStruct::deepClone()
Deep clone array structures
public array arbitBaseStruct::getProperties()
Get property names Returns an arary with all properties defined in this struct.
public void arbitBaseStruct::__clone()
Method called, when struct ist cloned

Methods

diff

static array diff( arbitModuleModelWikiPage $from , arbitModuleModelWikiPage $to )

Diff two wiki pages Calculate the diff between two wiki pages.

Diff two wiki pages Calculate the diff between two wiki pages.

Parameters:
Name Type Description
$from arbitModuleModelWikiPage
$to arbitModuleModelWikiPage

findByTitle

static mixed findByTitle( string $namespace , string $title )

Find wiki page by title Return the wiki page with the specified title, or false, when no wiki page with the defined title could be found.

Find wiki page by title Return the wiki page with the specified title, or false, when no wiki page with the defined title could be found.

Parameters:
Name Type Description
$namespace string
$title string

getLastEdits

static array getLastEdits( string $namespace , [int $skip = 0] )

Get last edited documents Get an array with the documents, edited last.

Get last edited documents Get an array with the documents, edited last.

Parameters:
Name Type Description
$namespace string
$skip int

getPageCount

static array getPageCount( string $namespace )

Get count of available pages

Get count of available pages Get count of available pages in the wiki with the given namespace

Parameters:
Name Type Description
$namespace string

attachFile

void attachFile( string $name , string $fileName , [ $info = array()] )

Attach file to page

Attach file to page

Parameters:
Name Type Description
$name string
$fileName string
$info array

create

mixed create( )

Method called to create a new instance in the backend.

Method called to create a new instance in the backend. Method called when the model should be created in the backend the first time. This will normally throw an error if a model with the same identifier already exists in the backend.

Redefinition of:
Method Description
arbitModelBase::create() Method called to create a new instance in the backend.

createFromRevision

arbitModuleModelWikiPage createFromRevision( mixed $id , $data )

Create model from revision data Create a arbitModuleModelWikiPage from the array containing the data of one revision.

Create model from revision data Create a arbitModuleModelWikiPage from the array containing the data of one revision.

Parameters:
Name Type Description
$id mixed
$data array

delete

void delete( )

Method called to delete a instance in the backend.

Method called to delete a instance in the backend. Method called when the model should be deleted in the backend the first time. This will normally throw an error if a model with the given ID does not exist in the backend.

getAttachment

string getAttachment( string $name )

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

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

Parameters:
Name Type Description
$name string

getPageData

void getPageData( )

Fetch the basic project data

Fetch the basic project data Fetch the basic project data

getVersion

arbitModuleModelWikiPage getVersion( int $version )

Get specified version of wiki page Return a arbitModuleModelWikiPage object for the specified version of the current wiki page.

Get specified version of wiki page Return a arbitModuleModelWikiPage object for the specified version of the current wiki page.

Parameters:
Name Type Description
$version int

storeChanges

void storeChanges( )

Method called to store changes to the model.

Method called to store changes to the model. Method called to store changes in the model to the backend. The method should only modify the backend data, if something really has been changed in the model. Use the __set() method, which should wrap all write access to the model, to remember write access.

Redefinition of:
Method Description
arbitModelBase::storeChanges() Method called to store changes to the model.
Documentation generated on Mon, 05 Apr 2010 14:02:08 +0200 by phpDocumentor 1.4.3