Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
Zend_Mail_Part_Interface Interface Reference
Inheritance diagram for Zend_Mail_Part_Interface:
Zend_Mail_Part Zend_Mail_Message Zend_Mail_Part_File Zend_Mail_Message_File

Public Member Functions

 isMultipart ()
 
 getContent ()
 
 getSize ()
 
 getPart ($num)
 
 countParts ()
 
 getHeaders ()
 
 getHeader ($name, $format=null)
 
 getHeaderField ($name, $wantedPart=0, $firstName=0)
 
 __get ($name)
 
 __toString ()
 

Detailed Description

Definition at line 32 of file Interface.php.

Member Function Documentation

◆ __get()

__get (   $name)

Getter for mail headers - name is matched in lowercase

This getter is short for Zend_Mail_Part::getHeader($name, 'string')

See also
Zend_Mail_Part::getHeader()
Parameters
string$nameheader name
Returns
string value of header
Exceptions
Zend_Mail_Exception

Implemented in Zend_Mail_Part.

◆ __toString()

__toString ( )

magic method to get content of part

Returns
string content

Implemented in Zend_Mail_Part.

◆ countParts()

countParts ( )

Count parts of a multipart part

Returns
int number of sub-parts

Implemented in Zend_Mail_Part.

◆ getContent()

getContent ( )

Body of part

If part is multipart the raw content of this part with all sub parts is returned

Returns
string body
Exceptions
Zend_Mail_Exception

Implemented in Zend_Mail_Part.

◆ getHeader()

getHeader (   $name,
  $format = null 
)

Get a header in specificed format

Internally headers that occur more than once are saved as array, all other as string. If $format is set to string implode is used to concat the values (with Zend_Mime::LINEEND as delim).

Parameters
string$namename of header, matches case-insensitive, but camel-case is replaced with dashes
string$formatchange type of return value to 'string' or 'array'
Returns
string|array value of header in wanted or internal format
Exceptions
Zend_Mail_Exception

Implemented in Zend_Mail_Part.

◆ getHeaderField()

getHeaderField (   $name,
  $wantedPart = 0,
  $firstName = 0 
)

Get a specific field from a header like content type or all fields as array

If the header occurs more than once, only the value from the first header is returned.

Throws a Zend_Mail_Exception if the requested header does not exist. If the specific header field does not exist, returns null.

Parameters
string$namename of header, like in getHeader()
string$wantedPartthe wanted part, default is first, if null an array with all parts is returned
string$firstNamekey name for the first part
Returns
string|array wanted part or all parts as array($firstName => firstPart, partname => value)
Exceptions
Zend_Exception,Zend_Mail_Exception

Implemented in Zend_Mail_Part.

◆ getHeaders()

getHeaders ( )

Get all headers

The returned headers are as saved internally. All names are lowercased. The value is a string or an array if a header with the same name occurs more than once.

Returns
array headers as array(name => value)

Implemented in Zend_Mail_Part.

◆ getPart()

getPart (   $num)

Get part of multipart message

Parameters
int$numnumber of part starting with 1 for first part
Returns
Zend_Mail_Part wanted part
Exceptions
Zend_Mail_Exception

Implemented in Zend_Mail_Part, and Zend_Mail_Part_File.

◆ getSize()

getSize ( )

Return size of part

Returns
int size

Implemented in Zend_Mail_Part, and Zend_Mail_Part_File.

◆ isMultipart()

isMultipart ( )

Check if part is a multipart message

Returns
bool if part is multipart

Implemented in Zend_Mail_Part.


The documentation for this interface was generated from the following file: