CWIS Developer Documentation
List of all members
Topic Class Reference

Abstraction for topics within a Forum. More...

Inheritance diagram for Topic:
Inheritance graph
[legend]
Collaboration diagram for Topic:
Collaboration graph
[legend]

Setup/Initialization/Destruction

static Create ()
 Create an empty new topic. More...
 
 Delete ()
 Remove this topic from the database, deleting the underlying messages. More...
 

Accessors

 GetMessageList ()
 Get the list of messages in this topic. More...
 
 TopicId ()
 Get the ID of this topic. More...
 
 CreatorName ()
 Get the CWIS name of the user who created this topic. More...
 
 CreatorEmail ()
 Get the e-mail address of the user who created this topic. More...
 
 ForumId ($NewValue=DB_NOVALUE)
 Set or modify the forum with which this topic is associated. More...
 
 CreatorId ($NewValue=DB_NOVALUE)
 Get or set the creator of this topic. More...
 
 DateCreated ($NewValue=DB_NOVALUE)
 Get or set the creation date of this topic. More...
 
 TopicName ($NewValue=DB_NOVALUE)
 Get or modify the name of this topic. More...
 
 ViewCount ($NewValue=DB_NOVALUE)
 Get or set the view count for this topic. More...
 
 MessageCount ($NewValue=DB_NOVALUE)
 Get or set the message count for this topic. More...
 

Additional Inherited Members

- Public Member Functions inherited from Item
 __construct ($Id)
 Constructor, used to load existing items. More...
 
 Destroy ()
 Destroy item. More...
 
 Delete ()
 Destroy item. More...
 
 Id ()
 Get item ID. More...
 
 Name ($NewValue=DB_NOVALUE)
 Get/set name of item. More...
 
 DateCreated ($NewValue=DB_NOVALUE)
 Get/set when item was created. More...
 
 CreatedBy ($NewValue=DB_NOVALUE)
 Get/set ID of user who created the item. More...
 
 DateLastModified ($NewValue=DB_NOVALUE)
 Get/set when item was last modified. More...
 
 LastModifiedBy ($NewValue=DB_NOVALUE)
 Get/set ID of user who last modified the item. More...
 
- Static Public Member Functions inherited from Item
static GetCanonicalId ($Id)
 Normalize item ID to canonical form. More...
 
static ItemExists ($Id)
 Check whether an item exists with the specified ID. More...
 
- Public Attributes inherited from Item
const NO_ITEM = -2123456789
 ID value used to indicate no item. More...
 
- Protected Member Functions inherited from Item
 UpdateValue ($ColumnName, $NewValue=DB_NOVALUE)
 Convenience function to supply parameters to Database::UpdateValue(). More...
 
 UpdateDateValue ($ColumnName, $NewValue=DB_NOVALUE)
 Convenience function to supply parameters to Database::UpdateValue(), with preprocessing of new values to convert them into an SQL-compatible date format. More...
 
- Static Protected Member Functions inherited from Item
static CreateWithValues ($Values)
 Create a new item, using specified initial database values. More...
 
static SetDatabaseAccessValues ($ClassName)
 Set the database access values (table name, ID column name, name column name) for specified class. More...
 
- Protected Attributes inherited from Item
 $DB
 
 $Id
 
 $ItemIdColumnName
 
 $ItemNameColumnName
 
 $ItemTableName
 
 $ValueCache = array()
 
- Static Protected Attributes inherited from Item
static $ItemIdColumnNames
 
static $ItemNameColumnNames
 
static $ItemTableNames
 

Detailed Description

Abstraction for topics within a Forum.

Definition at line 14 of file Topic.php.

Member Function Documentation

static Topic::Create ( )
static

Create an empty new topic.

Returns
New topic object just created.

Definition at line 25 of file Topic.php.

References Item\$DB.

Referenced by Forum\AddTopic().

Here is the caller graph for this function:

Topic::CreatorEmail ( )

Get the e-mail address of the user who created this topic.

Returns
Returns the e-mail address of the user who created this topic, or NULL if CreatorEmail does not exists.

Definition at line 126 of file Topic.php.

References CreatorId().

Topic::CreatorId (   $NewValue = DB_NOVALUE)

Get or set the creator of this topic.

Parameters
int$NewValueUser ID of the creator of this topic. This parameter is optional.
Returns
Returns the user ID of user who created the topic.

Definition at line 157 of file Topic.php.

References Item\UpdateValue().

Referenced by CreatorEmail(), and CreatorName().

Here is the caller graph for this function:

Topic::CreatorName ( )

Get the CWIS name of the user who created this topic.

Returns
Returns the CWIS name of the user who created this topic, or NULL if Creator does not exists.

Definition at line 107 of file Topic.php.

References CreatorId().

Topic::DateCreated (   $NewValue = DB_NOVALUE)

Get or set the creation date of this topic.

Parameters
string$NewValueCreation date of this topic. This parameter is optional.
Returns
Returns the current creation date.

Definition at line 168 of file Topic.php.

References Item\UpdateValue().

Topic::Delete ( )

Remove this topic from the database, deleting the underlying messages.

Definition at line 43 of file Topic.php.

References Item\Destroy(), ForumId(), and Item\Id().

Topic::ForumId (   $NewValue = DB_NOVALUE)

Set or modify the forum with which this topic is associated.

Parameters
int$NewValueID of the forum with which this topic is associated. This parameter is optional.
Returns
Returns the ID of the forum currently associated with this topic.

Definition at line 146 of file Topic.php.

References Item\UpdateValue().

Referenced by Delete().

Here is the caller graph for this function:

Topic::GetMessageList ( )

Get the list of messages in this topic.

Returns
Returns an array of Message objects, indexed by message ID.

Definition at line 72 of file Topic.php.

References Item\Id().

Topic::MessageCount (   $NewValue = DB_NOVALUE)

Get or set the message count for this topic.

Parameters
int$NewValueMessage count for this topic. This parameter is optional.
Returns
Returns the current message count.

Definition at line 200 of file Topic.php.

References Item\UpdateValue().

Topic::TopicId ( )

Get the ID of this topic.

Returns
Returns the ID of this topic.
Deprecated:
Use Id() instead.

Definition at line 97 of file Topic.php.

References Item\Id().

Topic::TopicName (   $NewValue = DB_NOVALUE)

Get or modify the name of this topic.

Parameters
string$NewValueName of this topic. This parameter is optional.
Returns
Returns the current name of this topic.

Definition at line 178 of file Topic.php.

References Item\UpdateValue().

Topic::ViewCount (   $NewValue = DB_NOVALUE)

Get or set the view count for this topic.

Parameters
int$NewValueView count value for this topic. This parameter is optional.
Returns
Returns the current view count for this topic.

Definition at line 189 of file Topic.php.

References Item\UpdateValue().


The documentation for this class was generated from the following file: