UNB Components Code Reference

UnbMessageRevision class

The message revision class represents a single message revision in the UNB system and provides methods to find and manipulate message revision instances.

It depends on the UnbDatabase class for a database connection. It also uses the class UnbTag to manage message revision tags.

Extends class

UnbEntity

Public methods

   AddTag Assigns a tag to this message revision.
S Create Creates a new message revision instance for a message.
   CreateCopy Creates a new message revision instance for a message, based on this revision.
   Delete Deletes this instance of the message revision with all its references.
S FindAllByMessageId Finds all message revisions by their message ID.
S FindByMessageId Finds a message revision instance by its message ID and revision number.
S FindLatestByMessageId Finds the latest accessible message revision instance by its message ID and moderation state.
S FirstCreatedTime Gets the time when the message's first revision was created.
   GetAuthorUser Gets the UnbUser object of the message revision's author.
   GetAuthorUserId Gets the user ID of the author who created this revision.
   GetContent Gets the message revision's full content (if retrieved).
   GetContentLevel Gets the revision's content level.
   GetCreatedTime Gets the time when the revision was created.
   GetFileData Gets the contents of an attachment file.
   GetFileDataLength Gets the length of an attachment file in bytes.
   GetFileDataPath Gets the name of the attachment file on disk.
   GetHtmlContent Gets the message revision's cached HTML version of the content (if available and retrieved).
   GetMessageId Gets the revision's message ID.
   GetModerationState Gets this revision's moderation state.
   GetRevisionNumber Gets the revision number.
   GetSubject Gets the message revision's subject.
   GetSummary Gets this revision's summary of changes to the previous one.
   GetTagIds Gets (unsorted) tag IDs of all tags assigned to this message revision.
   GetTags Gets UnbTag objects of all tags assigned to this message revision.
   HasFileData Gets a value indicating whether this message revision has data attached.
   RemoveTag Removes a tag from this message revision.
   SetHtmlContent Sets the message revision's cached HTML version of the content.
   SetModerationState Sets this revision's moderation state.

Protected methods

S FromRecord Creates a UnbMessageRevision object from a database record array.

Private methods

   Class constructor No description available.
S ReadInternal Reads a message revision from the database.

Private fields

author  –  default: 0
User who created this revision
authorUser  –  default: null
Cached author UnbUser object
content  –  default: ''
contentLevel  –  default: 0
Remembers which level of content was requested for this revision
createdTime  –  default: 0
Time when this revision was created
db
Cached UnbDatabase instance
hasData  –  default: false
Does this message revision have attached data?
htmlContent  –  default: ''
Cached HTML output of the parsed content, used to accelerate displaying of the message (revision)
messageId  –  default: 0
ID of the message that this revision belongs to
moderationState  –  default: 0
Moderation state of this single revision (see UnbMessageRevision::MS_* constants)
revisionNumber  –  default: 0
Number of the revision, started at 1, increaded by 1 with every new revision
subject  –  default: ''
Subject of the message (revision)
summary  –  default: ''
Summary of the changes in this revivion to the previous one

Implementation file: messagerevision.class.php, line 47

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