コード例 #1
0
 /**
  * Constructor
  *
  * Prevent creating instances of this class by making the contructor private
  */
 private final function __construct(KConfig $config)
 {
     //Create the identifier registry
     self::$_identifiers = new KServiceIdentifierRegistry();
     if (isset($config['cache_prefix'])) {
         self::$_identifiers->setCachePrefix($config['cache_prefix']);
     }
     if (isset($config['cache_enabled'])) {
         self::$_identifiers->enableCache($config['cache_enabled']);
     }
     //Create the service container
     self::$_services = new KServiceContainer();
     //Auto-load the koowa adapter
     KServiceIdentifier::addLocator(new KServiceLocatorKoowa());
 }