WeakWiki


WeakWiki\Document
lib\engine.library.php at line 92

Class Document

Document

public class Document

This class represents a document.


Method Summary
void

__construct(str title, str text)

Creates an instance of this class.

void

delete()

Deletes the document.

void

editable()

Returns if the current user is allowed to edit the document.

void

exists()

Returns, if the Document exists.

protected void

getFileName()

Gets the documents source file name.

void

getHTML()

Returns the parsed wiki text.

protected void

getParsedFile()

Gets the preparsed file name.

void

getPermissions(mixed ul)

Gets the permissions for a user group.

void

getSource()

Gets the Document's text.

void

getText()

Gets the Document's text.

void

getTitle()

Gets the Document's title.

protected void

readPermissions()

Evaluates the Document's permissions.

void

readable()

Returns if the current user is allowed to read the document.

void

request(mixed op)

Checks if an operation is allowed for the current user.

void

update(mixed title, mixed text)

Updates the document.

void

write(str prefix, str postfix)

Writes the parsed wiki text.

Method Detail

lib\engine.library.php at line 116

__construct

public void __construct(str title, str text)

Creates an instance of this class. @param $title Title. @param $texr Text.


lib\engine.library.php at line 198

delete

public void delete()

Deletes the document.


lib\engine.library.php at line 304

editable

public void editable()

Returns if the current user is allowed to edit the document. @return TRUE if the document may be edited, otherwise FALSE.


lib\engine.library.php at line 273

exists

public void exists()

Returns, if the Document exists. @return TRUE, if the Document exists, otherwise FALSE.


lib\engine.library.php at line 382

getFileName

protected void getFileName()

Gets the documents source file name. @return File name.


lib\engine.library.php at line 164

getHTML

public void getHTML()

Returns the parsed wiki text. @return Parsed Document text.


lib\engine.library.php at line 390

getParsedFile

protected void getParsedFile()

Gets the preparsed file name. @return File name.


lib\engine.library.php at line 314

getPermissions

public void getPermissions(mixed ul)

Gets the permissions for a user group. @param $ul User level: UL_UNKNOWN, UL_READ, UL_EDIT, UL_ADMIN. @return Permission set.


lib\engine.library.php at line 156

getSource

public void getSource()

Gets the Document's text. @return Text.


lib\engine.library.php at line 137

getText

public void getText()

Gets the Document's text. @return Text.


lib\engine.library.php at line 129

getTitle

public void getTitle()

Gets the Document's title. @return Title.


lib\engine.library.php at line 327

readPermissions

protected void readPermissions()

Evaluates the Document's permissions.


lib\engine.library.php at line 296

readable

public void readable()

Returns if the current user is allowed to read the document. @return TRUE if the document may be read, otherwise FALSE.


lib\engine.library.php at line 283

request

public void request(mixed op)

Checks if an operation is allowed for the current user. @param $op Operation string: OP_READ, OP_EDIT (= OP_WRITE), OP_HISTORY, OP_READ. @return TRUE if operation is permittet, otherwise FALSE.


lib\engine.library.php at line 216

update

public void update(mixed title, mixed text)

Updates the document. @param $title New title. @param $text New text. @return Returns E_OK if update was successful. Otherwise an error code.


lib\engine.library.php at line 191

write

public void write(str prefix, str postfix)

Writes the parsed wiki text. @param $prefix Text to precede the Document's text. @param $postfix Text to succeed the Document's text.


WeakWiki