MessagePartFactory
Abstract factory for subclasses of MessagePart.
Tags
Table of Contents
- $partStreamFilterManagerFactory : PartStreamFilterManagerFactory
- $streamFactory : StreamFactory
- $instances : array<string|int, MessagePartFactory>
- __construct() : mixed
- Initializes class dependencies.
- getInstance() : MessagePartFactory
- Returns the singleton instance for the class.
- newInstance() : MessagePart
- Constructs a new MessagePart 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
$partStreamFilterManagerFactory
protected
PartStreamFilterManagerFactory
$partStreamFilterManagerFactory
$streamFactory
protected
StreamFactory
$streamFactory
$instances
private
static array<string|int, MessagePartFactory>
$instances
= null
Methods
__construct()
Initializes class dependencies.
public
__construct(StreamFactory $streamFactory, PartStreamFilterManagerFactory $psf) : mixed
Parameters
- $streamFactory : StreamFactory
- $psf : PartStreamFilterManagerFactory
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 MessagePart object and returns it
public
abstract newInstance(PartBuilder $partBuilder[, StreamInterface $messageStream = null ]) : MessagePart
Parameters
- $partBuilder : PartBuilder
- $messageStream : StreamInterface = null
Return values
MessagePart —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