CWIS Developer Documentation

- Home
- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Attributes | List of all members
Topic Class Reference

Abstraction for topics within a Forum. More...

## Public Attributes
const | OK = 0
const | NONEXISTENT = 1

## Setup/Initialization/Destruction
| Topic ($TopicId=NULL)
| Object Constructor.
| Delete ()
| Remove this topic from the database, deleting the underlying messages.

## Accessors
| GetMessageList ()
| Get a list of messages in this topic.
| TopicId ()
| Get the Id of this topic.
| CreatorName ()
| Get the CWIS name of the user who created this topic.
| CreatorEmail ()
| Get the email address of the user who created this topic.
| ForumId ($NewValue=DB_NOVALUE)
| Set or modify the forum with which this topic is associated.
| CreatorId ($NewValue=DB_NOVALUE)
| Get or Set the creator of this topic.
| DateCreated ($NewValue=DB_NOVALUE)
| Get or set set the creation date of this topic.
| TopicName ($NewValue=DB_NOVALUE)
| Get or modify the name of this topic.
| ViewCount ($NewValue=DB_NOVALUE)
| Get or set the viewcount for this topic.
| MessageCount ($NewValue=DB_NOVALUE)
| Get or set the messagecount for this topic.
| GetErrorStatus ()
| Retrieve the error status.

## Detailed Description

Abstraction for topics within a Forum.

Definition at line 27 of file Topic.php.

## Member Function Documentation

Topic::CreatorEmail | ( |  | ) |

Get the email address of the user who created this topic.

Returns
  Email address of the user who created this topic

Definition at line 155 of file Topic.php.

References CreatorId().

Topic::CreatorId | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get or Set the creator of this topic.

Parameters

  NewValue | (OPTIONAL)

Returns
  The current CreatorId

Definition at line 173 of file Topic.php.

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
  CWIS name of the user who created this topic

Definition at line 145 of file Topic.php.

References CreatorId().

Topic::DateCreated | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get or set set the creation date of this topic.

Parameters

  NewValue | (OPTIONAL)

Returns
  The current creation date

Definition at line 180 of file Topic.php.

Topic::Delete | ( |  | ) |

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

Definition at line 85 of file Topic.php.

References ForumId(), OK, and TopicId().

Topic::ForumId | ( |  | $NewValue = `DB_NOVALUE` | ) |

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

Parameters

  NewValue | (OPTIONAL)

Returns
  The current ForumId

Definition at line 166 of file Topic.php.

Referenced by Delete().

Here is the caller graph for this function:

Topic::GetErrorStatus | ( |  | ) |

Retrieve the error status.

Returns
  Topic::OK if everything worked, something else otherwise

Definition at line 207 of file Topic.php.

Topic::GetMessageList | ( |  | ) |

Get a list of messages in this topic.

Returns
  An array of Message objects, indexed by message Id

Definition at line 115 of file Topic.php.

References TopicId().

Topic::MessageCount | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get or set the messagecount for this topic.

Parameters

  NewValue | (OPTIONAL)

Returns
  The current message count

Definition at line 201 of file Topic.php.

Topic::Topic | ( |  | $TopicId = `NULL` | ) |

Object Constructor.

After constructing the object, be sure to call GetErrorStatus() and verify that it returns Topic::OK

Parameters

  TopicId | The Id desired from the database, or -1 to genreate a new topic

Definition at line 46 of file Topic.php.

References NONEXISTENT, OK, and TopicId().

Topic::TopicId | ( |  | ) |

Get the Id of this topic.

Returns
  Id of this topic

Definition at line 139 of file Topic.php.

Referenced by Delete(), GetMessageList(), and Topic().

Here is the caller graph for this function:

Topic::TopicName | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get or modify the name of this topic.

Parameters

  NewValue | (OPTIONAL)

Returns
  The current name of this topic

Definition at line 187 of file Topic.php.

Topic::ViewCount | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get or set the viewcount for this topic.

Parameters

  NewValue | (OPTIONAL)

Returns
  The current viewcount

Definition at line 194 of file Topic.php.

## Member Data Documentation

const Topic::NONEXISTENT = 1

Definition at line 34 of file Topic.php.

Referenced by Topic().

const Topic::OK = 0

Definition at line 33 of file Topic.php.

Referenced by Delete(), and Topic().

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

- objects/Topic.php