FoTopic
public class FoTopic
Method Summary | |
---|---|
void | __construct(str file) Creates a new instance of the class. |
void | addTopic(mixed topic) Adds a subtopic to the topic. |
void | editable() Returns if the current user is allowed to edit the document. |
void | Gets the topic's file name. |
void | Returns the parent topic of this topic. |
void | getPermissions(mixed ul) Gets the permissions for a user group. |
void | Gets the topic's privileges. |
void | getText() Gets the topic's text. |
void | Returns the threads in this topic. |
void | getTitle() Gets the topic's title. |
void | Returns the topics in this topic. |
protected void | load() Loads topic from file. |
protected void | Evaluates the topic'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 | save() Serializes the object into a topic file. |
void | Serializes the object into a string. |
void | setParent(mixed value) Sets the parent topic of this topic. |
void | setPrivileges(mixed value) Sets the topic's privileges. |
void | setText(mixed value) Sets the topic's text. |
void | setTitle(mixed value) Sets the topic's title. |
public void __construct(str file)
Creates a new instance of the class.
public void addTopic(mixed topic)
Adds a subtopic to the topic. @param $topic Topic.
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 getFileName()
Gets the topic's file name. @return Returns the file name.
public void getParent()
Returns the parent topic of this topic. @return Parent topic.
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 getPrivileges()
Gets the topic's privileges. @return Returns the privileges.
public void getText()
Gets the topic's text. @return Returns the text.
public void getThreads()
Returns the threads in this topic. @return Threads.
public void getTitle()
Gets the topic's title. @return Returns the title.
public void getTopics()
Returns the topics in this topic. @return Topics.
protected void load()
Loads topic from file.
protected void readPermissions()
Evaluates the topic'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_WRITE, OP_ADMIN. @return TRUE if operation is permittet, otherwise FALSE.
public void save()
Serializes the object into a topic file.
public void serialize()
Serializes the object into a string.
public void setParent(mixed value)
Sets the parent topic of this topic. @param value Parent topic.
public void setPrivileges(mixed value)
Sets the topic's privileges. @param $value Privileges.
public void setText(mixed value)
Sets the topic's text. @param $value Text.
public void setTitle(mixed value)
Sets the topic's title. @param $value Title.
This class represents a topic.