Back to index

awl  0.53
Public Member Functions | Private Attributes
Multipart Class Reference

List of all members.

Public Member Functions

 __construct ()
 addPart ()
 getMimeHeaders ()
 getMimeParts ()

Private Attributes

 $parts
 $boundary

Detailed Description

Definition at line 38 of file Multipart.php.


Constructor & Destructor Documentation

Definition at line 43 of file Multipart.php.

                         {
    $this->parts = array();
    $this->boundary = uuid();
  }

Member Function Documentation

Definition at line 48 of file Multipart.php.

                     {
    $args = func_get_args();
    if ( is_string($args[0]) ) {
      $newPart = new SinglePart( $args[0], (isset($args[1])?$args[1]:'text/plain'), (isset($args[2])?$args[2]:array())); 
    }
    else
      $newPart = $args[0];
        
    $this->parts[] = $newPart;
    
    return $newPart;
  }

Definition at line 62 of file Multipart.php.

                            {
    return 'MIME-Version: 1.0' . SinglePart::$crlf
          .'Content-Type: multipart/mixed; boundary='.$this->boundary . SinglePart::$crlf ;
  }

Definition at line 67 of file Multipart.php.

                          {
    $result = '--' . $this->boundary . SinglePart::$crlf;
    foreach( $this->parts AS $part ) {
      $result .= $part->render() . SinglePart::$crlf . '--' . $this->boundary;
    }
    $result .= '--' . SinglePart::$crlf;
    return $result;
  }

Member Data Documentation

Definition at line 41 of file Multipart.php.

Multipart::$parts [private]

Definition at line 40 of file Multipart.php.


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