Beispiel #1
0
 public function __construct()
 {
     parent::__construct(static::APP_NAME, static::APP_VERSION);
     $this->setContainer(new ServiceContainer());
     $this->binder = new IocBinder($this->getContainer());
     $this->binder->preBind();
 }
 /**
  * @return ServiceContainer
  */
 public static function loadContainer($configFile)
 {
     if (!static::$container) {
         $container = new ServiceContainer();
         $iocBinder = new IocBinder($container);
         $iocBinder->preBind();
         $config = (require $configFile);
         $iocBinder->postBind($config);
         static::$container = $container;
     }
     return static::$container;
 }