Interface Xyster_Container_Adapter

Description

Responsible for providing an instance of a specific type

An instance of this interface will be used inside a container for every component that is registered.

  • copyright: Copyright (c) 2007-2008 Irrational Logic (http://irrationallogic.net)
  • license: New BSD License

Located in /Container/Adapter.php (line 27)


	
			
Direct descendents
Class Description
Xyster_Container_Behavior Tagging interface; Behaviors modify the components created by an Injector
Method Summary
Methods
accept (line 38)

Accepts a visitor for this Adapter

The method is normally called by visiting a Xyster_Container_Interface, that cascades the visitor also down to all its Component Adapter instances.

void accept (Xyster_Container_Visitor $visitor)
getDelegate (line 43)
Xyster_Container_Adapter getDelegate ()
getDescriptor (line 50)

Gets the descriptor of this adapter

string getDescriptor ()
getImplementation (line 60)

Retrieve the class of the component

Should normally be a concrete class (ie, a class that can be instantiated).

  • return: the component's implementation class
Xyster_Type getImplementation ()
getInstance (line 76)

Retrieve the component instance

This method will usually create a new instance each time it is called, but that is not required.

For example, Xyster_Container_Behavior_Cached will always return the same instance.

  • return: component instance.
  • throws: Exception if the component could not be instantiated.
  • throws: Exception if the component has dependencies which could not be resolved, or instantiation of the component lead to an ambigous situation within the container.
object the getInstance (Xyster_Container_Interface $container)
getKey (line 86)

Retrieve the key associated with the component

Should either be a class type (normally an interface) or an identifier that is unique (within the scope of the current Container).

  • return: the component's key
mixed getKey ()
verify (line 97)

Verify that all dependencies for this adapter can be satisifed

Normally, the adapter should verify this by checking that the associated Container contains all the needed dependnecies.

  • throws: Exception if one or more dependencies cannot be resolved
void verify (Xyster_Container_Interface $container)

Documentation generated on Mon, 19 May 2008 17:08:11 -0400 by phpDocumentor 1.4.2