Class Message

Description

The object that contains a message.

message is the object that contains messages. It is a recursive object in that through the $entities variable, it can contain more objects of type message. See documentation in mime.txt for a better description of how this works.

  • since: 1.3.0

Located in /class/mime/Message.class.php (line 27)


	
			
Variable Summary
string $body_part
string $decoded_body
array $entities
mixed $entity
string $entity_id
mixed $flags
boolean $is_answered
boolean $is_deleted
boolean $is_flagged
boolean $is_mdnsent
boolean $is_seen
integer $length
object $mime_header
integer $offset
mixed $parent
string $parent_ent
string $type0
string $type1
Method Summary
void addEntity (object $msg)
void addRFC822Header (mixed $read)
void clean_up ()
array findAlternativeEntity (array $alt_order)
array findDisplayEntity ([array $entity = array()], [array $alt_order = array('text/plain', 'text/html')], [boolean $strict = false])
array getAttachments ([array $exclude_id = array()], [array $result = array()])
mixed getEntity (string $ent)
string getFilename ()
string getMailbox ()
void initAttachment (string $type, string $name, string $location)
object AddressStructure parseAddress (string $read,  &$i, integer $i)
object Message parseBodyStructure (string $read,  &$i, [mixed $sub_msg = ''], integer $i)
void parseDisposition (string $read,  &$i, integer $i, object Disposition 2)
object MessageHeader parseEnvelope (string $read,  &$i, object $hdr, integer $i)
object Language parseLanguage (string $read,  &$i, integer $i)
string parseLiteral (string $read,  &$i, integer $i)
string parseMessage (string $read, string $type0, string $type1)
integer parseParenthesis (string $read, integer $i)
array parseProperties (string $read,  &$i, integer $i)
string parseQuote (string $read,  &$i, integer $i)
void parseStructure ( $read,  &$i, [ $sub_msg = ''])
void setBody (string $s)
void setEnt (string $ent)
void setEntIds ( &$msg, [mixed $init = false], [integer $i = 0], object $msg)
Variables
string $att_local_name = '' (line 126)

Local attachment filename location where the tempory attachment is stored. For use in delivery class.

string $body_part = '' (line 108)

Message text body

string $decoded_body = '' (line 78)
array $entities = array() (line 56)

Nested mime parts

mixed $entity (line 70)
string $entity_id = '' (line 61)

Message part id

mixed $flags = '' (line 41)
boolean $is_answered = 0 (line 88)

Message \answered status

boolean $is_deleted = 0 (line 93)

Message \deleted status

boolean $is_flagged = 0 (line 98)

Message \flagged status

boolean $is_mdnsent = 0 (line 103)

Message mdn status

boolean $is_seen = 0 (line 83)

Message \seen status

integer $length = 0 (line 120)

Message part length

for fetching body parts out of raw messages

object $mime_header = '' (line 37)

MessageHeader object

integer $offset = 0 (line 114)

Message part offset

for fetching body parts out of raw messages

mixed $parent = '' (line 74)
string $parent_ent (line 66)

Parent message part id

object $rfc822_header = '' (line 32)

rfc822header object

string $type0 = '' (line 46)

Media type

string $type1 = '' (line 51)

Media subtype

Methods
addEntity (line 139)

Add nested message part

void addEntity (object $msg)
  • object $msg
addRFC822Header (line 192)

Add header object to message object.

WARNING: Unfinished code. Don't expect it to work in older sm versions.

  • todo: FIXME: rfc822header->parseHeader() does not return rfc822header object
void addRFC822Header (mixed $read)
  • mixed $read: array or string with message headers
clean_up (line 254)

Clean message object

void clean_up ()
findAlternativeEntity (line 949)
array findAlternativeEntity (array $alt_order)
  • array $alt_order
findDisplayEntity (line 872)
array findDisplayEntity ([array $entity = array()], [array $alt_order = array('text/plain', 'text/html')], [boolean $strict = false])
  • array $entity
  • array $alt_order
  • boolean $strict
findRelatedEntity (line 975)
array findRelatedEntity ()
getAttachments (line 995)
array getAttachments ([array $exclude_id = array()], [array $result = array()])
  • array $exclude_id
  • array $result
getEntity (line 201)
  • return: (object or string?)
mixed getEntity (string $ent)
  • string $ent
getFilename (line 148)

Get file name used for mime part

  • return: file name
  • since: 1.3.2
string getFilename ()
getMailbox (line 266)
string getMailbox ()
initAttachment (line 1040)

Add attachment to message object

void initAttachment (string $type, string $name, string $location)
  • string $type: attachment type
  • string $name: attachment name
  • string $location: path to attachment
parseAddress (line 690)
  • return: object
object AddressStructure parseAddress (string $read,  &$i, integer $i)
  • string $read
  • integer $i
  • &$i
parseBodyStructure (line 340)
  • return: object
  • since: 1.4.0 (code was part of parseStructure() in 1.3.x)
  • todo: document me
object Message parseBodyStructure (string $read,  &$i, [mixed $sub_msg = ''], integer $i)
  • string $read
  • integer $i
  • mixed $sub_msg
  • &$i
parseDisposition (line 725)
void parseDisposition (string $read,  &$i, integer $i, object Disposition 2)
parseEnvelope (line 551)
  • return: object
object MessageHeader parseEnvelope (string $read,  &$i, object $hdr, integer $i)
  • string $read
  • integer $i
  • object $hdr: MessageHeader object
  • &$i
parseLanguage (line 750)
  • return: object or empty string
object Language parseLanguage (string $read,  &$i, integer $i)
  • string $read
  • integer $i
  • &$i
parseLiteral (line 640)
  • todo: document me
string parseLiteral (string $read,  &$i, integer $i)
  • string $read
  • integer $i
  • &$i
parseMessage (line 799)

Function to fill the message structure in case the

bodystructure is not available NOT FINISHED YET

  • return: (only when type0 is not message or multipart)
string parseMessage (string $read, string $type0, string $type1)
  • string $read
  • string $type0: message part type
  • string $type1: message part subtype
parseParenthesis (line 778)

Parse message text enclosed in parenthesis

integer parseParenthesis (string $read, integer $i)
  • string $read
  • integer $i
parseProperties (line 520)
array parseProperties (string $read,  &$i, integer $i)
  • string $read
  • integer $i
  • &$i
parseQuote (line 666)
  • todo: document me
string parseQuote (string $read,  &$i, integer $i)
  • string $read
  • integer $i
  • &$i
parseStructure (line 290)
void parseStructure ( $read,  &$i, [ $sub_msg = ''])
  • $read
  • &$i
  • $sub_msg
purgeAttachments (line 1064)

Delete all attachments from this object from disk.

  • since: 1.5.1
void purgeAttachments ()
setBody (line 247)

Set message body

void setBody (string $s)
  • string $s: message body
setEnt (line 131)
void setEnt (string $ent)
  • string $ent: entity id
setEntIds (line 303)
  • since: 1.4.0
  • todo: document me
void setEntIds ( &$msg, [mixed $init = false], integer $i, object $msg)
  • object $msg
  • mixed $init
  • integer $i
  • &$msg

Documentation generated on Sat, 07 Oct 2006 16:12:26 +0300 by phpDocumentor 1.3.0RC6