UNB Components Code Reference

UnbMessage::Create method

Creates a new message instance.

public static function UnbMessage::Create ($subject, $content, $data = null, $dataFileName = null, $writeToFile = null, $entryPoint = false, $primaryRef = null);

Parameters

subject
(string) Subject of the message's first revision or null (max. 255 characters)
content
(string) Content of the message's first revision (max. 16,777,215 characters)
data  –  optional, default: null
(string) Attached file data contents or null
dataFileName  –  optional, default: null
(string) Local file name for attached file data or null (do not use together with data)
writeToFile  –  optional, default: null
(bool) Write the attached file data into a file instead of the database or null for automatic decision
entryPoint  –  optional, default: false
(bool) Specifies whether the new message shall be a discussion entry point.
primaryRef  –  optional, default: null
(UnbMessage) Primary message reference for the new message
(int) Message ID of the primary reference for the new message

Return value

The newly created UnbMessage object

Remarks

The newly created message instance is also stored in the database.

Exceptions from UnbMessageRevision::Create() are passed through.

Exceptions thrown

UnbSecurityException If not logged in.
UnbDatabaseException No description available.

Privileges required

Must be logged in

Member of class: UnbMessage

Implementation file: message.class.php, line 100

© 2010 Yves Goergen. UNB Components Homepage. Reference generated on 2010-03-07.