Interface Xyster_Container_Interface

Description

The core container interface

It is used to retrieve component instances from the container.

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

Located in /Container/Interface.php (line 26)


	
			
Direct descendents
Class Description
Xyster_Container_Mutable Core interface for registration of components within a container
Method Summary
void accept (Xyster_Container_Visitor $visitor)
object an getComponent (mixed $componentKeyOrType)
void getComponentAdapterByType (mixed $componentType, [Xyster_Container_NameBinding $nameBinding = null])
Xyster_Collection_List getComponentAdapters ([ $componentType = null])
Xyster_Collection_List getComponents ([ $componentType = null])
Methods
accept (line 33)

Accepts a visitor that should visit the child containers, component adapters and component instances.

void accept (Xyster_Container_Visitor $visitor)
  • visitor $visitor: the visitor
getComponent (line 41)

Retrieve a component instance registered with a specific key or type

  • return: instantiated component, or null if no component has been registered for the specified key
object an getComponent (mixed $componentKeyOrType)
  • mixed $componentKeyOrType: the key or Type that the component was registered with
getComponentAdapter (line 64)

Find a component adapter associated with the specified key

  • return: the component adapter associated with this key, or null
Xyster_Container_Adapter getComponentAdapter (mixed $componentKey)
  • mixed $componentKey: the key that the component was registered with
getComponentAdapterByType (line 72)

Find a component adapter by type (and optionally by parameter name)

void getComponentAdapterByType (mixed $componentType, [Xyster_Container_NameBinding $nameBinding = null])
getComponentAdapters (line 82)

Retrieve all the component adapters inside this container.

If the type is supplied, this method returns the adapters associated with the specified type.

  • return: a fixed collection containing all the adapters inside this container
Xyster_Collection_List getComponentAdapters ([ $componentType = null])
  • Xyster_Type $componentType
getComponents (line 56)

Retrieve all the registered component instances in the container

The components are returned in their order of instantiation, which depends on the dependency order between them.

If the type parameter is supplied, this method returns the components of the specified type.

  • return: all the components.
  • throws: Exception if the instantiation of the component fails
Xyster_Collection_List getComponents ([ $componentType = null])
  • Xyster_Type $componentType: the type to search

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