|
CWIS Developer Documentation
|
Abstraction for forum messages and resource comments. More...
Public Attributes | |
| const | OK = 0 |
| const | NONEXISTENT = 1 |
| const | PARENTTYPE_TOPIC = 1 |
| const | PARENTTYPE_RESOURCE = 2 |
Setup/Initialization/Destruction | |
| __construct ($MessageId=NULL) | |
| Object constructor. More... | |
| Delete () | |
| Delete this message from the underlying database. More... | |
Accessors | |
| MessageId () | |
| Get this message's messageId. More... | |
| PosterName () | |
| Get the CWIS username of the most recent poster. More... | |
| PosterEmail () | |
| Get the email address of the most recent poster. More... | |
| EditorId ($NewValue=DB_NOVALUE) | |
| Get the CWIS user ID of the most recent editor. More... | |
| ParentId ($NewValue=DB_NOVALUE) | |
| Get or set the ParentId. More... | |
| ParentType ($NewValue=DB_NOVALUE) | |
| Get or set the ParentType. More... | |
| DatePosted ($NewValue=DB_NOVALUE) | |
| Get or set the date posted. More... | |
| DateEdited ($NewValue=DB_NOVALUE) | |
| Get or set the date the message was last edited. More... | |
| PosterId ($NewValue=DB_NOVALUE) | |
| Get or set the poster id (e.g., the author) for this message. More... | |
| Subject ($NewValue=DB_NOVALUE) | |
| Get or set the message subject. More... | |
| Body ($NewValue=DB_NOVALUE) | |
| Get or set the message body. More... | |
| GetErrorStatus () | |
| Retrieve the error status. More... | |
Abstraction for forum messages and resource comments.
Definition at line 14 of file Message.php.
| Message::__construct | ( | $MessageId = NULL | ) |
Object constructor.
After constructing the object, be sure to call GetErrorStatus() and verify that it returns Message::OK.
| int | $MessageId | The message Id to retrieve from the database, or -1 to create a new message |
Definition at line 35 of file Message.php.
References MessageId().
| Message::Body | ( | $NewValue = DB_NOVALUE | ) |
Get or set the message body.
| string | $NewValue | New body text. (OPTIONAL) |
Definition at line 195 of file Message.php.
| Message::DateEdited | ( | $NewValue = DB_NOVALUE | ) |
Get or set the date the message was last edited.
| string | $NewValue | New edit date. (OPTIONAL) |
Definition at line 165 of file Message.php.
| Message::DatePosted | ( | $NewValue = DB_NOVALUE | ) |
Get or set the date posted.
| string | $NewValue | New posting date. (OPTIONAL) |
Definition at line 155 of file Message.php.
| Message::Delete | ( | ) |
Delete this message from the underlying database.
Definition at line 74 of file Message.php.
References MessageId().
| Message::EditorId | ( | $NewValue = DB_NOVALUE | ) |
Get the CWIS user ID of the most recent editor.
| int | $NewValue | New editor ID. (OPTIONAL) |
Definition at line 121 of file Message.php.
| Message::GetErrorStatus | ( | ) |
Retrieve the error status.
Definition at line 204 of file Message.php.
References MessageId().
| Message::MessageId | ( | ) |
Get this message's messageId.
Definition at line 91 of file Message.php.
Referenced by __construct(), Delete(), and GetErrorStatus().

| Message::ParentId | ( | $NewValue = DB_NOVALUE | ) |
Get or set the ParentId.
For forum posts, the ParentId is a TopicId. For resource comments, the ParentId is the ResourceId.
| int | $NewValue | New value to set (OPTIONAL) |
Definition at line 133 of file Message.php.
| Message::ParentType | ( | $NewValue = DB_NOVALUE | ) |
Get or set the ParentType.
Parent Type = 1 for forum posts and Parent Type = 2 for resource comments
| int | $NewValue | New parent type. (OPTIONAL) |
Definition at line 145 of file Message.php.
| Message::PosterEmail | ( | ) |
Get the email address of the most recent poster.
Definition at line 110 of file Message.php.
References PosterId().
| Message::PosterId | ( | $NewValue = DB_NOVALUE | ) |
Get or set the poster id (e.g., the author) for this message.
| int | $NewValue | New poster ID. (OPTIONAL) |
Definition at line 175 of file Message.php.
Referenced by PosterEmail(), and PosterName().

| Message::PosterName | ( | ) |
Get the CWIS username of the most recent poster.
Definition at line 100 of file Message.php.
References PosterId().
| Message::Subject | ( | $NewValue = DB_NOVALUE | ) |
Get or set the message subject.
| string | $NewValue | New subject text. (OPTIONAL) |
Definition at line 185 of file Message.php.
| const Message::NONEXISTENT = 1 |
Definition at line 20 of file Message.php.
| const Message::OK = 0 |
Definition at line 19 of file Message.php.
Referenced by Forum\DeleteMessage().
| const Message::PARENTTYPE_RESOURCE = 2 |
Definition at line 23 of file Message.php.
| const Message::PARENTTYPE_TOPIC = 1 |
Definition at line 22 of file Message.php.
Referenced by Forum\GetLastMessage(), and Forum\PostMessage().