Class Swift_DependencyContainer

(line 18)

Description


Located in File: /vendors/swiftMailer/classes/Swift/DependencyContainer.php

Dependency Injection container.


Class Variables

Summary:

Class Constants

Summary:

TYPE_ALIAS = 0x1000 (line 31)

Constant for aliases

TYPE_INSTANCE = 0x0010 (line 25)

Constant for new instance types

TYPE_SHARED = 0x0100 (line 28)

Constant for shared instance types

TYPE_VALUE = 0x0001 (line 22)

Constant for literal value types

Method Detail

Summary:
Swift_DependencyContainer __construct ()
array createDependenciesFor (string $itemName)
boolean has (string $itemName)
array listItems ()
mixed lookup (string $itemName)
Swift_DependencyContainer register (string $itemName)

Static Method getInstance (line 52)

Swift_DependencyContainer getInstance( )

Returns a singleton of the DependencyContainer.

Info

  • access - public

Constructor __construct (line 46)

Swift_DependencyContainer __construct( )

Constructor should not be used.

Use getInstance() instead.

Info

  • access - public

Method addConstructorLookup (line 249)

Swift_DependencyContainer addConstructorLookup( string $lookup)

Specify a dependency lookup for the constructor of the previously registered item.

Parameters

  • string $lookup:

Info

Method addConstructorValue (line 230)

Swift_DependencyContainer addConstructorValue( mixed $value)

Specify a literal (non looked up) value for the constructor of the previously registered item.

Parameters

  • mixed $value:

Info

Method asAliasOf (line 163)

Swift_DependencyContainer asAliasOf( string $lookup)

Specify the previously registered item as an alias of another item.

Parameters

  • string $lookup:

Info

  • access - public

Method asNewInstanceOf (line 181)

Swift_DependencyContainer asNewInstanceOf( string $className)

Specify the previously registered item as a new instance of $className.

register() must be called before this will work. Any arguments can be set with withDependencies(), addConstructorValue() or addConstructorLookup().

Parameters

  • string $className:

Info

Method asSharedInstanceOf (line 195)

Swift_DependencyContainer asSharedInstanceOf( string $className)

Specify the previously registered item as a shared instance of $className.

register() must be called before this will work.

Parameters

  • string $className:

Info

  • access - public

Method asValue (line 150)

Swift_DependencyContainer asValue( mixed $value)

Specify the previously registered item as a literal value.

register() must be called before this will work.

Parameters

  • mixed $value:

Info

  • access - public

Method createDependenciesFor (line 116)

array createDependenciesFor( string $itemName)

Create an array of arguments passed to the constructor of $itemName.

Parameters

  • string $itemName:

Info

  • access - public

Method has (line 76)

boolean has( string $itemName)

Test if an item is registered in this container with the given name.

Parameters

  • string $itemName:

Info

Method listItems (line 65)

array listItems( )

List the names of all items stored in the Container.

Info

  • access - public

Method lookup (line 89)

mixed lookup( string $itemName)

Lookup the item with the given $itemName.

Parameters

  • string $itemName:

Info

Method register (line 136)

Swift_DependencyContainer register( string $itemName)

Register a new dependency with $itemName.

This method returns the current DependencyContainer instance because it requires the use of the fluid interface to set the specific details for the dependency.

Parameters

  • string $itemName:

Info

Method withDependencies (line 211)

Swift_DependencyContainer withDependencies( $lookups)

Specify a list of injected dependencies for the previously registered item.

This method takes an array of lookup names.

Parameters

  • array $lookups:

Info

Inherited Variables

Inherited Class Variable Summary

Inherited Methods

Inherited Method Summary


Documentation generated on Fri, 12 Nov 2010 20:45:19 +0000 by phpDocumentor 1.4.3