Description

Represents a thread in the forum.

  • author: Marcel Werk
  • copyright: 2001-2009 WoltLab GmbH
  • license: WoltLab
DatabaseObject
   |
   --Thread

Direct descendents

Class Description
ThreadEditor ThreadEditor provides functions to create and edit the data of a thread.
ViewableThread Represents a viewable thread in the forum.

Variable Summary

Type Name
mixed $board
mixed $post

Method Summary

Return Name
Thread __construct(integer $threadID, [array $row = null], [integer $postID = null])
void canReplyThread([ $board = null])
void enter([ $board = null], [ $refreshSession = true])
boolean getPost()
mixed getRating()
array getTags( $languageIDArray)
void isMarked()
boolean isNew()
void subscribe()
void unsubscribe()
void updateSubscription()

Variables

$board

protected mixed $board = null


$post

protected mixed $post

Redefined in descendants as: FeedThread::$post


Inherited variables from DatabaseObject

DatabaseObject::$data

Methods

__construct

public Thread __construct(integer $threadID, [array $row = null], [integer $postID = null])

Creates a new thread object.

If id is set, the function reads the thread data from database. Otherwise it uses the given resultset.

Parameters:

  • $threadID - id of a thread
  • $row - resultset with thread data form database
  • $postID - id of a post in the requested thread

Redefinition of: DatabaseObject::__construct()

Redefined in descendants as: FeedThread::__construct()


canReplyThread

public void canReplyThread([ $board = null])

Returns true, if the active user can reply this thread.

Parameters:

  • $board

enter

public void enter([ $board = null], [ $refreshSession = true])

Enters the active user to this thread.

Parameters:

  • $board
  • $refreshSession

getPost

public boolean getPost()

Returns the requested post, if post id was given at creation of the Thread object.

  • return: requested post, if post id was given at creation of the Thread object

getRating

public mixed getRating()

Returns the result of the rating of this thread.

  • return: result of the rating of this thread

getTags

public array getTags( $languageIDArray)

Returns the tags of this thread.

Parameters:

  • $languageIDArray

isMarked

public void isMarked()

Returns true, if this thread is marked.

Redefined in descendants as: SubscribedThread::isMarked()


isNew

public boolean isNew()

Returns true, if this thread is new for the active user.

  • return: true, if this thread is new for the active user

subscribe

public void subscribe()

Subscribes the active user to this thread.


unsubscribe

public void unsubscribe()

Unsubscribes the active user to this thread.


updateSubscription

public void updateSubscription()

Updates the subscription of this thread for the active user.


Inherited methods from DatabaseObject

DatabaseObject::__construct(), DatabaseObject::handleData(), DatabaseObject::sort(), DatabaseObject::__get()