Пример #1
0
 /**
  * Create a Form container
  *
  * @param  Container $app
  *
  * @return Container
  */
 public static function make($app = null)
 {
     if (!$app) {
         $app = new Container();
     }
     // Bind classes to container
     $provider = new static($app);
     $app = $provider->bindCoreClasses($app);
     $app = $provider->bindForm($app);
     return $app;
 }
Пример #2
0
 /**
  * Make a Acetone container
  *
  * @return Container
  */
 public static function make($app = null)
 {
     if (!$app) {
         $app = new Container();
     }
     $serviceProvider = new static($app);
     // Bind classes
     $app = $serviceProvider->bindCoreClasses($app);
     $app = $serviceProvider->bindClasses($app);
     return $app;
 }
Пример #3
0
 /**
  * Static alias for binding classes to a given Container
  *
  * @param Container $app
  *
  * @return Container
  */
 public static function make(Container $app = null)
 {
     // If no Container, create one
     if (!$app) {
         $app = new Container();
     }
     // Call the class binders
     $serviceProvider = new static($app);
     $app = FormerServiceProvider::make($app);
     $app = $serviceProvider->bindCoreClasses($app);
     $app = $serviceProvider->bindWarkhamClasses($app);
     // Set framework
     $app['former']->framework('TwitterBootstrap3');
     return $app;
 }
Пример #4
0
 /**
  * Make a Rocketeer container
  *
  * @param Container $app
  *
  * @return Container
  */
 public static function make($app = null)
 {
     if (!$app) {
         $app = new Container();
     }
     $serviceProvider = new static($app);
     // Bind core paths and classes
     $app = $serviceProvider->bindPaths($app);
     $app = $serviceProvider->bindCoreClasses($app);
     // Bind Rocketeer's classes
     $app = $serviceProvider->bindClasses($app);
     $app = $serviceProvider->bindScm($app);
     // Load the user's events and tasks
     $app = $serviceProvider->loadFileOrFolder($app, 'tasks');
     $app = $serviceProvider->loadFileOrFolder($app, 'events');
     // Bind commands
     $app = $serviceProvider->bindCommands($app);
     return $app;
 }