MailMimeParser 2.1

Container extends Container
in package

Automatically configures classes and dependencies.

Sets up an automatic registration for classes when requested through Pimple by looking up the class's constructor and arguments.

Tags
author

Zaahid Bateson

Table of Contents

autoRegister()  : mixed
Returns a factory function for the passed class.
extend()  : callable
Overridden to see if the class can be auto-registered first before calling Pimple\Container::extend
offsetExists()  : bool
Overridden to see if the class can be auto-registered and return true if it can.
offsetGet()  : object
Overridden to see if the class can be auto-registered and return an instance if it can.
getParameterClass()  : string|null
Looks up the type of the passed ReflectionParameter and returns it as a fully qualified class name as expected by the class's auto registration.

Methods

autoRegister()

Returns a factory function for the passed class.

public autoRegister(string $class) : mixed

The returned factory method looks up arguments and uses pimple to get an instance of those types to pass them during construction.

Parameters
$class : string
Return values
mixed

extend()

Overridden to see if the class can be auto-registered first before calling Pimple\Container::extend

public extend(string $id, callable $callable) : callable
Parameters
$id : string
$callable : callable
Return values
callable

the wrapped $callable

offsetExists()

Overridden to see if the class can be auto-registered and return true if it can.

public offsetExists(string $id) : bool
Parameters
$id : string
Return values
bool

offsetGet()

Overridden to see if the class can be auto-registered and return an instance if it can.

public offsetGet(string $id) : object
Parameters
$id : string
Tags
throws
UnknownIdentifierException
Return values
object

getParameterClass()

Looks up the type of the passed ReflectionParameter and returns it as a fully qualified class name as expected by the class's auto registration.

private getParameterClass(ReflectionParameter $param) : string|null

Null is returned for built-in types.

Parameters
$param : ReflectionParameter
Return values
string|null

Search results