示例#1
0
 /**
  * Constructor.
  *
  * @param \Pimple|\Pimple\Container|null $container
  */
 public function __construct($container = null)
 {
     if ($container === null) {
         if (class_exists('Pimple\\Container')) {
             $container = new \Pimple\Container();
             $container->register(new BeanstalkPimple3ServiceProvider());
         } else {
             $container = new \Pimple();
             $sp = new BeanstalkPimple1ServiceProvider();
             $sp->register($container);
         }
     }
     $container['beanstalk.console_commands.queue_prefix'] = '';
     parent::__construct('Queue', null, $container);
     $this->addCommands($container['beanstalk.console_commands']);
 }
 public function register(Application $app)
 {
     $sp = new BeanstalkPimple1ServiceProvider();
     $sp->register($app);
 }
 public function register(Pimple $container)
 {
     $sp = new BeanstalkPimple1ServiceProvider();
     $sp->register($container);
 }