Message Class Reference
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 | |
Message ($MessageId=NULL) | |
Object constructor. | |
Delete () | |
Delete this message from the underlying database. | |
Accessors | |
MessageId () | |
Get this message's messageId. | |
PosterName () | |
Get the CWIS username of the most recent poster. | |
PosterEmail () | |
Get the email address of the most recent poster. | |
ParentId ($NewValue=DB_NOVALUE) | |
Get or set the ParentId. | |
ParentType ($NewValue=DB_NOVALUE) | |
Get or set the ParentType. | |
DatePosted ($NewValue=DB_NOVALUE) | |
Get or set the date posted. | |
PosterId ($NewValue=DB_NOVALUE) | |
Get or set the poster id (e.g., the author) for this message. | |
Subject ($NewValue=DB_NOVALUE) | |
Get or set the message subject. | |
Body ($NewValue=DB_NOVALUE) | |
Get or set the message body. | |
GetErrorStatus () | |
Retrieve the error status. |
Detailed Description
Abstraction for forum messages and resource comments.
Definition at line 27 of file Message.php.
Member Function Documentation
Message::Body | ( | $ | NewValue = DB_NOVALUE ) |
Get or set the message body.
- Parameters:
-
NewValue (OPTIONAL)
- Returns:
- Message body
Definition at line 169 of file Message.php.
Message::DatePosted | ( | $ | NewValue = DB_NOVALUE ) |
Get or set the date posted.
- Parameters:
-
NewValue (OPTIONAL)
- Returns:
- Posting date
Definition at line 148 of file Message.php.
Message::Delete | ( | ) |
Delete this message from the underlying database.
Definition at line 86 of file Message.php.
References MessageId(), and OK.
Message::GetErrorStatus | ( | ) |
Retrieve the error status.
- Returns:
- Message::OK if everything worked, something else otherwise
Definition at line 175 of file Message.php.
Message::Message | ( | $ | MessageId = NULL ) |
Object constructor.
After constructing the object, be sure to call GetErrorStatus() and verify that it returns Message::OK.
- Parameters:
-
MessageId The message Id to retrieve from the database, or -1 to create a new message
Definition at line 47 of file Message.php.
References MessageId(), NONEXISTENT, and OK.
Message::MessageId | ( | ) |
Get this message's messageId.
- Returns:
- MessageId
Definition at line 103 of file Message.php.
References MessageId().
Referenced by Delete(), Message(), and MessageId().

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.
- Parameters:
-
NewValue New value to set (OPTIONAL)
- Returns:
- The current ParentId
Definition at line 132 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
- Parameters:
-
NewValue (OPTIONAL)
- Returns:
- The current ParentType
Definition at line 141 of file Message.php.
Message::PosterEmail | ( | ) |
Get the email address of the most recent poster.
- Returns:
- Email address of the most recent poster
Definition at line 119 of file Message.php.
References PosterId().
Message::PosterId | ( | $ | NewValue = DB_NOVALUE ) |
Get or set the poster id (e.g., the author) for this message.
- Parameters:
-
NewValue (OPTIONAL)
- Returns:
- CWIS Id number of this message's author
Definition at line 155 of file Message.php.
Referenced by PosterEmail(), and PosterName().

Message::PosterName | ( | ) |
Get the CWIS username of the most recent poster.
- Returns:
- CWIS username of the most recent poster
Definition at line 109 of file Message.php.
References PosterId().
Message::Subject | ( | $ | NewValue = DB_NOVALUE ) |
Get or set the message subject.
- Parameters:
-
NewValue (OPTIONAL)
- Returns:
- Message subject
Definition at line 162 of file Message.php.
Member Data Documentation
const Message::NONEXISTENT = 1 |
Definition at line 32 of file Message.php.
Referenced by Message().
const Message::OK = 0 |
Definition at line 31 of file Message.php.
const Message::PARENTTYPE_RESOURCE = 2 |
Definition at line 35 of file Message.php.
const Message::PARENTTYPE_TOPIC = 1 |
Definition at line 34 of file Message.php.
The documentation for this class was generated from the following file: