Document
public class 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 | Gets the documents source file name. |
void | getHTML() Returns the parsed wiki text. |
protected void | Gets the preparsed file name. |
void | getPermissions(mixed ul) Gets the permissions for a user group. |
void | Gets the Document's text. |
void | getText() Gets the Document's text. |
void | getTitle() Gets the Document's title. |
protected void | 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. |
public void __construct(str title, str text)
Creates an instance of this class. @param $title Title. @param $texr Text.
public void delete()
Deletes the document.
public void editable()
Returns if the current user is allowed to edit the document. @return TRUE if the document may be edited, otherwise FALSE.
public void exists()
Returns, if the Document exists. @return TRUE, if the Document exists, otherwise FALSE.
protected void getFileName()
Gets the documents source file name. @return File name.
public void getHTML()
Returns the parsed wiki text. @return Parsed Document text.
protected void getParsedFile()
Gets the preparsed file name. @return File name.
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.
public void getSource()
Gets the Document's text. @return Text.
public void getText()
Gets the Document's text. @return Text.
public void getTitle()
Gets the Document's title. @return Title.
protected void readPermissions()
Evaluates the Document's permissions.
public void readable()
Returns if the current user is allowed to read the document. @return TRUE if the document may be read, otherwise FALSE.
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.
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.
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.
This class represents a document.