Injectable factory class used by MimePart to construct PartFilter instances in a testable way.

Users are expected to use the static PartFilter methods directly -- this class simply encapsulates them in an object: o PartFilter::fromContentType o PartFilter::fromInlineContentType o PartFilter::fromDisposition

see
author Zaahid Bateson
package MailMimeParser

 Methods

Constructs a PartFilter from the passed array of options and returns it.

newFilterFromArray(array $init) : \ZBateson\MailMimeParser\Message\PartFilter
see

Parameters

$init

array

Returns

\ZBateson\MailMimeParser\Message\PartFilter

Creates a filter for the passed mime content-type.

newFilterFromContentType(string $mimeType) : \ZBateson\MailMimeParser\Message\PartFilter

This method just calls PartFilter::fromContentType.

see

Parameters

$mimeType

string

Returns

\ZBateson\MailMimeParser\Message\PartFilter

Creates a filter for the passed disposition and optional multipart filter.

newFilterFromDisposition(string $disposition, integer $multipart = \ZBateson\MailMimeParser\Message\PartFilter::FILTER_OFF) : \ZBateson\MailMimeParser\Message\PartFilter

This method just calls PartFilter::newFilterFromDisposition.

see

Parameters

$disposition

string

$multipart

integer

one of PartFilter::FILTER_OFF, PartFilter::FILTER_INCLUDE or PartFilter::FILTER_EXCLUDE

Returns

\ZBateson\MailMimeParser\Message\PartFilter

Creates an 'inline' filter for the passed mime content-type.

newFilterFromInlineContentType(string $mimeType) : \ZBateson\MailMimeParser\Message\PartFilter

This method just calls PartFilter::fromInlineContentType.

see

Parameters

$mimeType

string

Returns

\ZBateson\MailMimeParser\Message\PartFilter