Esempio n. 1
0
 /**
  * Prepare bootstrap value
  *
  * @param ContainerInterface $container Container to prepare
  * @param SlimApp $app Application object
  * @param mixed $value Value for bootstrap
  */
 private static function prepareBootstrapValue(ContainerInterface $container, SlimApp $app, $value)
 {
     if ($value === null) {
         return;
     }
     if ($value instanceof BootstrapInterface) {
         $value->bootstrap($app);
     }
     if ($value instanceof ContainerInterface) {
         self::prepareContainer($app, $value);
     }
     if ($value instanceof ServiceProviderInterface) {
         $container->register($value);
     }
 }