original_string: public function fetchParts( $filter = null, $includeDigests = false )
      {
          $context = new ezcMailPartWalkContext( array( __CLASS__, 'collectPart' ) );
          $context->includeDigests = $includeDigests;
          $context->filter = $filter;
          $context->level = 0;
          $this->walkParts( $context, $this );
          return $context->getParts();
      }
code: public function fetchParts( $filter = null, $includeDigests = false )
      {
          $context = new ezcMailPartWalkContext( array( __CLASS__, 'collectPart' ) );
          $context->includeDigests = $includeDigests;
          $context->filter = $filter;
          $context->level = 0;
          $this->walkParts( $context, $this );
          return $context->getParts();
      }
code_tokens: public function fetchParts ( $ filter = null , $ includeDigests = false ) { $ context = new ezcMailPartWalkContext ( array ( __CLASS__ , 'collectPart' ) ) ; $ context -> includeDigests = $ includeDigests ; $ context -> filter = $ filter ; $ context -> level = 0 ; $ this -> walkParts ( $ context , $ this ) ; return $ context -> getParts ( ) ; }
docstring: Returns an array of mail parts from the current mail.
  
  The array returned contains objects of classes:
  - ezcMailText
  - ezcMailFile
  - ezcMailRfc822Digest
  If the method is called with $includeDigests as true, then the returned
  array will not contain ezcMailRfc822Digest objects, but instead the mail
  parts inside the digests.
  The parameter $filter can be used to restrict the returned mail parts,
  eg. $filter = array( 'ezcMailFile' ) to return only file mail parts.
  
  A typical use for this function is to get a list of attachments from a mail.
  Example:
  <code>
  // $mail is an ezcMail object
  $parts = $mail->fetchParts();
  // after the above line is executed, $parts will contain an array of mail parts objects,
  // for example one ezcMailText object ($parts[0]) and two ezcMailRfc822Digest objects ($parts[1] and $parts[2]).
  // the ezcMailText object will be used to render the mail text, and the
  // other two objects will be displayed as links ("view attachment")
  
  // when user clicks on one of the two attachments, the parts of that attachment
  // must be retrieved in order to render the attached digest:
  $subparts = $parts[1]->mail->fetchParts();
  // after the above line is executed, $subparts will contain an array of mail parts objects,
  // for example one ezcMailText object and one ezcMailFile object
  </code>
  
  @param array(string) $filter
  @param bool $includeDigests
  @return array(ezcMailPart)
docstring_tokens: Returns an array of mail parts from the current mail .