Ejemplo n.º 1
0
 /**
  * Wrap a Closure such that it is shared.
  *
  * @param \Closure $closure
  * @return \Closure 
  * @static 
  */
 public static function share($closure)
 {
     //Method inherited from \Illuminate\Container\Container
     return \Illuminate\Foundation\Application::share($closure);
 }
Ejemplo n.º 2
0
 /**
  * Create crypt provider object. 
  *
  * @return void
  */
 protected function createCryptProvider()
 {
     $this->app["auth2.{$this->name}.crypt"] = $this->app->share(function ($app) {
         return new BcryptHasher();
     });
 }
 /**
  * Register the queue listener console command.
  *
  * @param \Illuminate\Foundation\Application $app
  *
  * @return void
  */
 protected function registerInternalCommand($app)
 {
     $app['command.queue.internal'] = $app->share(function ($app) {
         return new InternalCommand();
     });
 }
 /**
  * Register the queue listener console command.
  *
  * @param \Illuminate\Foundation\Application $app
  *
  * @return void
  */
 protected function registerAsyncCommand($app)
 {
     $app['command.queue.async'] = $app->share(function ($app) {
         return new AsyncCommand();
     });
 }