MimePartFactory extends MessagePartFactory
Responsible for creating MimePart instances.
Tags
Table of Contents
- $partFilterFactory : PartFilterFactory
- $partStreamFilterManagerFactory : PartStreamFilterManagerFactory
- $streamFactory : StreamFactory
- $instances : array<string|int, MessagePartFactory>
- __construct() : mixed
- Initializes dependencies.
- getInstance() : MessagePartFactory
- Returns the singleton instance for the class.
- newInstance() : MimePart
- Constructs a new MimePart object and returns it
- getCachedInstance() : MessagePartFactory
- Returns a cached singleton instance if one exists, or null if one hasn't been created yet.
- setCachedInstance() : mixed
- Sets a cached singleton instance.
Properties
$partFilterFactory
protected
PartFilterFactory
$partFilterFactory
$partStreamFilterManagerFactory
protected
PartStreamFilterManagerFactory
$partStreamFilterManagerFactory
$streamFactory
protected
StreamFactory
$streamFactory
$instances
private
static array<string|int, MessagePartFactory>
$instances
= null
Methods
__construct()
Initializes dependencies.
public
__construct(StreamFactory $sdf, PartStreamFilterManagerFactory $psf, PartFilterFactory $pf) : mixed
Parameters
- $sdf : StreamFactory
- $psf : PartStreamFilterManagerFactory
- $pf : PartFilterFactory
Return values
mixed —getInstance()
Returns the singleton instance for the class.
public
static getInstance(StreamFactory $sdf, PartStreamFilterManagerFactory $psf[, PartFilterFactory $pf = null ][, MessageHelperService $mhs = null ]) : MessagePartFactory
Parameters
- $sdf : StreamFactory
- $psf : PartStreamFilterManagerFactory
- $pf : PartFilterFactory = null
- $mhs : MessageHelperService = null
Return values
MessagePartFactory —newInstance()
Constructs a new MimePart object and returns it
public
newInstance(PartBuilder $partBuilder[, StreamInterface $messageStream = null ]) : MimePart
Parameters
- $partBuilder : PartBuilder
- $messageStream : StreamInterface = null
Return values
MimePart —getCachedInstance()
Returns a cached singleton instance if one exists, or null if one hasn't been created yet.
protected
static getCachedInstance() : MessagePartFactory
Return values
MessagePartFactory —setCachedInstance()
Sets a cached singleton instance.
protected
static setCachedInstance(MessagePartFactory $instance) : mixed
Parameters
- $instance : MessagePartFactory