API Documentation

Mime/Message.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Mime
version
$Id: Message.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Mime_Message

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Mime_Message

category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Mime
Properties
$_parts
$_mime
Methods
getParts
setParts
addPart
isMultiPart
setMime
getMime
generateMessage
getPartHeadersArray
getPartHeaders
getPartContent
_disassembleMime
createFromMessage

Description

Properties

$_mime

 $_mime = 'null'

Details

visibility
protected
default
null
final
false
static
false

$_parts

 $_parts = 'array'

Details

visibility
protected
default
array
final
false
static
false

Methods

_disassembleMime

_disassembleMime( string $body, string $boundary ) : array

Explode MIME multipart string into seperate parts

Parts consist of the header and the body of each MIME part.

Arguments
$body
string
$boundary
string
Output
array
Details
visibility
protected
final
false
static
true

addPart

addPart( Zend_Mime_Part $part ) :

Append a new Zend_Mime_Part to the current message

Arguments
$part
Zend_Mime_Part
Details
visibility
public
final
false
static
false

createFromMessage

createFromMessage( string $message, string $boundary, string $EOL = Zend_Mime ) : Zend_Mime_Message

Decodes a MIME encoded string and returns a Zend_Mime_Message object with all the MIME parts set according to the given string

Arguments
$message
string
$boundary
string
$EOL
string
EOL string; defaults to {@link Zend_Mime::LINEEND}
Details
visibility
public
final
false
static
true

generateMessage

generateMessage( string $EOL = Zend_Mime ) : string

Generate MIME-compliant message from the current configuration

This can be a multipart message if more than one MIME part was added. If only one part is present, the content of this part is returned. If no part had been added, an empty string is returned.

Parts are seperated by the mime boundary as defined in Zend_Mime. If {@link setMime()} has been called before this method, the Zend_Mime object set by this call will be used. Otherwise, a new Zend_Mime object is generated and used.

Arguments
$EOL
string
EOL string; defaults to {@link Zend_Mime::LINEEND}
Output
string
Details
visibility
public
final
false
static
false

getMime

getMime( ) : Zend_Mime

Returns the Zend_Mime object in use by the message

If the object was not present, it is created and returned. Can be used to determine the boundary used in this message.

Output
Zend_Mime
Details
visibility
public
final
false
static
false

getPartContent

getPartContent( int $partnum,  $EOL = Zend_Mime ) : string

Get the (encoded) content of a given part as a string

Arguments
$partnum
int
$EOL
Output
string
Details
visibility
public
final
false
static
false

getPartHeaders

getPartHeaders( int $partnum,  $EOL = Zend_Mime ) : string

Get the headers of a given part as a string

Arguments
$partnum
int
$EOL
Output
string
Details
visibility
public
final
false
static
false

getPartHeadersArray

getPartHeadersArray( int $partnum ) : array

Get the headers of a given part as an array

Arguments
$partnum
int
Output
array
Details
visibility
public
final
false
static
false

getParts

getParts( ) : array

Returns the list of all Zend_Mime_Parts in the message

Output
array
of Zend_Mime_Part
Details
visibility
public
final
false
static
false

isMultiPart

isMultiPart( ) : boolean

Check if message needs to be sent as multipart MIME message or if it has only one part.

Output
boolean
Details
visibility
public
final
false
static
false

setMime

setMime( Zend_Mime $mime ) :

Set Zend_Mime object for the message

This can be used to set the boundary specifically or to use a subclass of Zend_Mime for generating the boundary.

Arguments
$mime
Zend_Mime
Details
visibility
public
final
false
static
false

setParts

setParts( array $parts ) :

Sets the given array of Zend_Mime_Parts as the array for the message

Arguments
$parts
array
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.