MailMimeParser 0.4

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
author

Zaahid Bateson

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

Methods

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

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
see
stream_filter_register
see
stream_wrapper_register
Return values
mixed

__construct()

Constructs a SimpleDi - call singleton() to invoke

private __construct() : mixed
Return values
mixed

Search results