UNB Components Code Reference

UnbMessage::Create method

Creates a new message instance.

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

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)

contentType  –  optional, default: null

(string) MIME content type of attached file data (max. 255 characters, ignored if no data is specified)

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

draft  –  optional, default: false

(bool) Declare the new message revision as draft

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.
Exception 

If the input file could not be read or copied.

Privileges required

Must be logged in

Member of class: UnbMessage

Implementation file: message.class.php, line 118

© 2011 Yves Goergen. UNB Components Homepage. Reference generated on 2011-02-06.