Class com.webservicesware.ioc.IoCContainerAdapter

Implemented Interfaces

IoCContainer

Description

com.webservicesware.ioc.DefaultIoCContainer

 Prosta impementacja IoCContainera 
 rejestruje i pobiera instacje komponentow
 

See Also

Method Index

new IoCContainerAdapter()
getComponentInstance(), getVersion(), registerComponent(), registerComponentInstance()

Constructor Detail

IoCContainerAdapter

public function IoCContainerAdapter()

Method Detail

getVersion

public function getVersion():Number

Pobiera informacje o versji kontenera

Specified By

getVersion() in com.webservicesware.ioc.IoCContainer

getComponentInstance

public function getComponentInstance(classID:String)

registerComponentInstance

public function registerComponentInstance(instance, classID:String)

Funkcja registerComponentInstance ktory to obiekt automatycznie uznawany jest za singleton

Parameters

instancereferencja do rejestorwanego obiektu
classIDnazwa pod jaka bedzie dostep do instancji

Specified By

registerComponentInstance() in com.webservicesware.ioc.IoCContainer

registerComponent

public function registerComponent(component:IoCComponent)

TODO:zastanowic sie nad dodawaniem komponentu, czy czasem nie stosowac innej polityki dostepu do nazw (nie przechowywac to w MAP tylko w zwyklym arrayu i potem iteracja sprawdzac nazwy componenta TODO: niech to rzuca jakis wyjatek jesli dodajemy componnent o ID juz istniejacym

Specified By

registerComponent() in com.webservicesware.ioc.IoCContainer