SimpleDi
Dependency injection container for use by ZBateson\MailMimeParser - because a more complex one seems like overkill.
Constructs objects and whatever dependencies they require.
Tags
Table of Contents
- $consumerService : ConsumerService
- $headerFactory : HeaderFactory
- $headerPartFactory : HeaderPartFactory
- $messageWriterService : MessageWriterService
- $mimeLiteralPartFactory : MimeLiteralPartFactory
- $partFactory : MimePartFactory
- $partStreamRegistry : PartStreamRegistry
- getConsumerService() : ConsumerService
- Returns the header consumer service
- getHeaderFactory() : HeaderFactory
- Returns the header factory service instance.
- getHeaderPartFactory() : HeaderPartFactory
- Returns the part factory service
- getMessageWriterService() : MessageWriterService
- Returns a MessageWriterService instance.
- getMimeLiteralPartFactory() : MimeLiteralPartFactory
- Returns the MimeLiteralPartFactory service
- getPartFactory() : MimePartFactory
- Returns the part factory service instance.
- getPartStreamRegistry() : PartStreamRegistry
- Returns the part stream registry service instance. The method also registers the stream extension by calling registerStreamExtensions.
- newCharsetConverter() : CharsetConverter
- Constructs and returns a new CharsetConverter object.
- newMessage() : Message
- Constructs and returns a new Message object.
- newMessageParser() : MessageParser
- Constructs and returns a new MessageParser object.
- singleton() : SimpleDi
- Returns the singleton instance.
- getInstance() : mixed
- Returns a singleton 'service' instance for the given service named $var with a class type of $class.
- registerStreamExtensions() : mixed
- Registers stream extensions for PartStream and CharsetStreamFilter
- __construct() : mixed
- Constructs a SimpleDi - call singleton() to invoke
Properties
$consumerService
protected
ConsumerService
$consumerService
$headerFactory
protected
HeaderFactory
$headerFactory
$headerPartFactory
protected
HeaderPartFactory
$headerPartFactory
$messageWriterService
protected
MessageWriterService
$messageWriterService
$mimeLiteralPartFactory
protected
MimeLiteralPartFactory
$mimeLiteralPartFactory
$partFactory
protected
MimePartFactory
$partFactory
$partStreamRegistry
protected
PartStreamRegistry
$partStreamRegistry
Methods
getConsumerService()
Returns the header consumer service
public
getConsumerService() : ConsumerService
Return values
ConsumerService —getHeaderFactory()
Returns the header factory service instance.
public
getHeaderFactory() : HeaderFactory
Return values
HeaderFactory —getHeaderPartFactory()
Returns the part factory service
public
getHeaderPartFactory() : HeaderPartFactory
Return values
HeaderPartFactory —getMessageWriterService()
Returns a MessageWriterService instance.
public
getMessageWriterService() : MessageWriterService
Return values
MessageWriterService —getMimeLiteralPartFactory()
Returns the MimeLiteralPartFactory service
public
getMimeLiteralPartFactory() : MimeLiteralPartFactory
Return values
MimeLiteralPartFactory —getPartFactory()
Returns the part factory service instance.
public
getPartFactory() : MimePartFactory
Return values
MimePartFactory —getPartStreamRegistry()
Returns the part stream registry service instance. The method also registers the stream extension by calling registerStreamExtensions.
public
getPartStreamRegistry() : PartStreamRegistry
Return values
PartStreamRegistry —newCharsetConverter()
Constructs and returns a new CharsetConverter object.
public
newCharsetConverter(string $fromCharset, string $toCharset) : CharsetConverter
Parameters
- $fromCharset : string
-
source charset
- $toCharset : string
-
destination charset
Return values
CharsetConverter —newMessage()
Constructs and returns a new Message object.
public
newMessage() : Message
Return values
Message —newMessageParser()
Constructs and returns a new MessageParser object.
public
newMessageParser() : MessageParser
Return values
MessageParser —singleton()
Returns the singleton instance.
public
static singleton() : SimpleDi
Return values
SimpleDi —getInstance()
Returns a singleton 'service' instance for the given service named $var with a class type of $class.
protected
getInstance(string $var, string $class) : mixed
Parameters
- $var : string
-
the name of the service
- $class : string
-
the name of the class
Return values
mixed —the service object
registerStreamExtensions()
Registers stream extensions for PartStream and CharsetStreamFilter
protected
registerStreamExtensions() : mixed
Tags
Return values
mixed —__construct()
Constructs a SimpleDi - call singleton() to invoke
private
__construct() : mixed