MessageFactory extends MimePartFactory
Responsible for creating Message instances.
Tags
Table of Contents
- $messageHelperService : MessageHelperService
- $partFilterFactory : PartFilterFactory
- $partStreamFilterManagerFactory : PartStreamFilterManagerFactory
- $streamFactory : StreamFactory
- $instances : array<string|int, MessagePartFactory>
- __construct() : mixed
- Constructor
- getInstance() : MessagePartFactory
- Returns the singleton instance for the class.
- newInstance() : MimePart
- Constructs a new Message 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
$messageHelperService
    protected
        MessageHelperService
    $messageHelperService
    
        
    
$partFilterFactory
    protected
        PartFilterFactory
    $partFilterFactory
    
        
    
$partStreamFilterManagerFactory
    protected
        PartStreamFilterManagerFactory
    $partStreamFilterManagerFactory
    
        
    
$streamFactory
    protected
        StreamFactory
    $streamFactory
    
        
    
$instances
    private
    static    array<string|int, MessagePartFactory>
    $instances
     = null
        
    
Methods
__construct()
Constructor
    public
                __construct(StreamFactory $sdf, PartStreamFilterManagerFactory $psf, PartFilterFactory $pf, MessageHelperService $mhs) : mixed
        
        Parameters
- $sdf : StreamFactory
- $psf : PartStreamFilterManagerFactory
- $pf : PartFilterFactory
- $mhs : MessageHelperService
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 Message object and returns it
    public
                newInstance(PartBuilder $partBuilder[, StreamInterface $stream = null ]) : MimePart
        
        Parameters
- $partBuilder : PartBuilder
- $stream : 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