Copied!

Collection of static methods that return callables for common IMultiPart
child filters.

Abstract
Methods
public static fromAttachmentFilter()
 

Provides an 'attachment' filter used by Message::getAttachmentPart.

The method filters out the following types of parts:

  • text/plain and text/html parts that do not have an 'attachment'
    disposition
  • any part that returns true for isMultiPart()
  • any part that returns true for isSignaturePart()
  • return callable
public static fromContentType( $mimeType)
 

Includes only parts that match the passed $mimeType in the return value
of a call to 'getContentType()'.

  • param string $mimeType Mime type of parts to find.
  • return callable
public static fromDisposition( $disposition, $includeMultipart = false, $includeSignedParts = false)
 

Finds parts with the passed disposition (matching against
IMessagePart::getContentDisposition()), optionally including
multipart parts and signed parts.

  • param string $disposition The disposition to find.
  • param bool $includeMultipart Optionally include multipart parts by
    passing true (defaults to false).
  • param bool $includeSignedParts Optionally include signed parts (defaults
    to false).
  • return callable
public static fromHeaderValue( $name, $value, $excludeSignedParts = true)
 

Provides a filter that keeps parts that contain a header of $name with a
value that matches $value (case insensitive).

By default signed parts are excluded. Pass FALSE to the third parameter
to include them.

  • param string $name The header name to look up
  • param string $value The value to match
  • param bool $excludeSignedParts Optional signed parts exclusion (defaults
    to true).
  • return callable
public static fromInlineContentType( $mimeType)
 

Returns parts matching $mimeType that do not have a Content-Disposition
set to 'attachment'.

  • param string $mimeType Mime type of parts to find.
  • return callable
Methods
public static fromAttachmentFilter()
 

Provides an 'attachment' filter used by Message::getAttachmentPart.

The method filters out the following types of parts:

  • text/plain and text/html parts that do not have an 'attachment'
    disposition
  • any part that returns true for isMultiPart()
  • any part that returns true for isSignaturePart()
  • return callable
public static fromContentType( $mimeType)
 

Includes only parts that match the passed $mimeType in the return value
of a call to 'getContentType()'.

  • param string $mimeType Mime type of parts to find.
  • return callable
public static fromDisposition( $disposition, $includeMultipart = false, $includeSignedParts = false)
 

Finds parts with the passed disposition (matching against
IMessagePart::getContentDisposition()), optionally including
multipart parts and signed parts.

  • param string $disposition The disposition to find.
  • param bool $includeMultipart Optionally include multipart parts by
    passing true (defaults to false).
  • param bool $includeSignedParts Optionally include signed parts (defaults
    to false).
  • return callable
public static fromHeaderValue( $name, $value, $excludeSignedParts = true)
 

Provides a filter that keeps parts that contain a header of $name with a
value that matches $value (case insensitive).

By default signed parts are excluded. Pass FALSE to the third parameter
to include them.

  • param string $name The header name to look up
  • param string $value The value to match
  • param bool $excludeSignedParts Optional signed parts exclusion (defaults
    to true).
  • return callable
public static fromInlineContentType( $mimeType)
 

Returns parts matching $mimeType that do not have a Content-Disposition
set to 'attachment'.

  • param string $mimeType Mime type of parts to find.
  • return callable
© 2023 Bruce Wells
Search Namespaces \ Classes
Configuration