/** * Initialize */ protected static function _initialize() { if (self::$_initialized === true) { return; } self::$_initialized = true; //Created the object container self::$_container = new ArrayObject(); //Create the command chain and register the adapters self::$_chain = new KFactoryChain(); //TODO : move the registration of the adapters out of the initialize self::registerAdapter(new KFactoryAdapterKoowa()); self::registerAdapter(new KFactoryAdapterJoomla()); self::registerAdapter(new KFactoryAdapterComponent()); }
/** * Constructor * * Prevent creating instances of this class by making the contructor private */ private final function __construct(KConfig $config) { self::$_registry = new ArrayObject(); self::$_chain = new KFactoryChain(); }