Beispiel #1
0
 /**
  * Initialise the IoC Service Container
  */
 protected function setupContainer()
 {
     // Only set the application on the Facade
     // if there is none yet set
     if (is_null(App::getFacadeApplication())) {
         App::setFacadeApplication(new Container());
     }
     $this->container = App::getFacadeApplication();
     $this->container->singleton('app', $this->container);
 }
 /**
  * Destroy the Inversion of Control (IoC) Container
  */
 public static function destroy()
 {
     App::clearResolvedInstances();
     App::setFacadeApplication(null);
     self::setContainer(null);
 }