CWIS Developer Documentation
|
Abstraction for forum messages and resource comments. More...
Public Attributes | |
const | PARENTTYPE_TOPIC = 1 |
const | PARENTTYPE_RESOURCE = 2 |
![]() | |
const | NO_ITEM = -2123456789 |
ID value used to indicate no item. More... | |
Setup/Initialization/Destruction | |
static | Create () |
Create an empty message object. 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... | |
Additional Inherited Members | |
![]() | |
__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 | GetCanonicalId ($Id) |
Normalize item ID to canonical form. More... | |
static | ItemExists ($Id) |
Check whether an item exists with the specified ID. More... | |
![]() | |
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 | 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... | |
![]() | |
$DB | |
$Id | |
$ItemIdColumnName | |
$ItemNameColumnName | |
$ItemTableName | |
$ValueCache = array() | |
![]() | |
static | $ItemIdColumnNames |
static | $ItemNameColumnNames |
static | $ItemTableNames |
Abstraction for forum messages and resource comments.
Definition at line 14 of file Message.php.
Message::Body | ( | $NewValue = DB_NOVALUE | ) |
Get or set the message body.
string | $NewValue | New body text. (OPTIONAL) |
Definition at line 179 of file Message.php.
References Item\UpdateValue().
|
static |
Create an empty message object.
Definition at line 28 of file Message.php.
References Item\$DB.
Referenced by Forum\PostMessage(), and Resource_Test\testResource().
Message::DateEdited | ( | $NewValue = DB_NOVALUE | ) |
Get or set the date the message was last edited.
string | $NewValue | New edit date. (OPTIONAL) |
Definition at line 149 of file Message.php.
References Item\UpdateValue().
Message::DatePosted | ( | $NewValue = DB_NOVALUE | ) |
Get or set the date posted.
string | $NewValue | New posting date. (OPTIONAL) |
Definition at line 139 of file Message.php.
References Item\UpdateValue().
Message::Delete | ( | ) |
Delete this message from the underlying database.
Definition at line 45 of file Message.php.
References Item\Destroy().
Message::EditorId | ( | $NewValue = DB_NOVALUE | ) |
Get the CWIS user ID of the most recent editor.
int | $NewValue | New editor ID. (OPTIONAL) |
Definition at line 105 of file Message.php.
References Item\UpdateValue().
Message::MessageId | ( | ) |
Get this message's messageId.
Definition at line 59 of file Message.php.
References Item\Id().
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 117 of file Message.php.
References Item\UpdateValue().
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 129 of file Message.php.
References Item\UpdateValue().
Message::PosterEmail | ( | ) |
Get the email address of the most recent poster.
Definition at line 86 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 159 of file Message.php.
References Item\UpdateValue().
Referenced by PosterEmail(), and PosterName().
Message::PosterName | ( | ) |
Get the CWIS username of the most recent poster.
Definition at line 68 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 169 of file Message.php.
References Item\UpdateValue().
const Message::PARENTTYPE_RESOURCE = 2 |
Definition at line 17 of file Message.php.
Referenced by Resource_Test\testResource().
const Message::PARENTTYPE_TOPIC = 1 |
Definition at line 16 of file Message.php.
Referenced by Forum\GetLastMessage(), and Forum\PostMessage().