Zend Framework  1.12
Public Member Functions | Protected Attributes | List of all members
Zend_Mail_Part_File Class Reference

Public Member Functions

 __construct (array $params)
 Public constructor.
 
 getContent ($stream=null)
 Body of part.
 
 getSize ()
 Return size of part.
 
 getPart ($num)
 Get part of multipart message.
 
- Public Member Functions inherited from Zend_Mail_Part
 __construct (array $params)
 Public constructor.
 
 setPartClass ($class)
 Set name pf class used to encapsulate message parts.
 
 getPartClass ()
 Retrieve the class name used to encapsulate message parts.
 
 isMultipart ()
 Check if part is a multipart message.
 
 getContent ()
 Body of part.
 
 getSize ()
 Return size of part.
 
 getPart ($num)
 Get part of multipart message.
 
 countParts ()
 Count parts of a multipart part.
 
 getHeaders ()
 Get all headers.
 
 getHeader ($name, $format=null)
 Get a header in specificed format.
 
 headerExists ($name)
 Check wheater the Mail part has a specific header.
 
 getHeaderField ($name, $wantedPart=0, $firstName=0)
 Get a specific field from a header like content type or all fields as array.
 
 __get ($name)
 Getter for mail headers - name is matched in lowercase.
 
 __isset ($name)
 Isset magic method proxy to hasHeader.
 
 __toString ()
 magic method to get content of part
 
 hasChildren ()
 implements RecursiveIterator::hasChildren()
 
 getChildren ()
 implements RecursiveIterator::getChildren()
 
 valid ()
 implements Iterator::valid()
 
 next ()
 implements Iterator::next()
 
 key ()
 implements Iterator::key()
 
 current ()
 implements Iterator::current()
 
 rewind ()
 implements Iterator::rewind()
 

Protected Attributes

 $_contentPos = array()
 
 $_partPos = array()
 
 $_fh
 
- Protected Attributes inherited from Zend_Mail_Part
 $_headers
 
 $_content
 
 $_topLines = ''
 
 $_parts = array()
 
 $_countParts
 
 $_iterationPos = 1
 
 $_mail
 
 $_messageNum = 0
 
 $_partClass
 

Additional Inherited Members

- Protected Member Functions inherited from Zend_Mail_Part
 _cacheContent ()
 Cache content and split in parts if multipart.
 

Constructor & Destructor Documentation

__construct ( array  $params)

Public constructor.

This handler supports the following params:

  • file filename or open file handler with message content (required)
  • startPos start position of message or part in file (default: current position)
  • endPos end position of message or part in file (default: end of file)
Parameters
array$paramsfull message with or without headers
Exceptions
Zend_Mail_Exception
See Also
Zend_Mail_Exception
Zend_Mail_Exception
Zend_Mail_Exception
Zend_Mail_Exception

Member Function Documentation

getContent (   $stream = null)

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
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
See Also
Zend_Mail_Exception

Implements Zend_Mail_Part_Interface.

getSize ( )

Return size of part.

Quite simple implemented currently (not decoding). Handle with care.

Returns
int size

Implements Zend_Mail_Part_Interface.

Member Data Documentation

$_contentPos = array()
protected
$_fh
protected
$_partPos = array()
protected