当前位置: 首页>>代码示例>>PHP>>正文


PHP QueueManager::addConnector方法代码示例

本文整理汇总了PHP中Illuminate\Queue\QueueManager::addConnector方法的典型用法代码示例。如果您正苦于以下问题:PHP QueueManager::addConnector方法的具体用法?PHP QueueManager::addConnector怎么用?PHP QueueManager::addConnector使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Illuminate\Queue\QueueManager的用法示例。


在下文中一共展示了QueueManager::addConnector方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: registerResqueConnector

 /**
  * Register the Resque queue connector.
  *
  * @param  \Illuminate\Queue\QueueManager  $manager
  * @return void
  */
 protected function registerResqueConnector($manager)
 {
     $connections = Config::get('queue.connections', []);
     foreach ($connections as $connection) {
         if ($connection['driver'] !== 'resque') {
             $manager->addConnector($connection['driver'], function () {
                 return new ResqueConnector();
             });
         }
     }
     $manager->addConnector('resque', function () {
         $config = Config::get('database.redis.default');
         Config::set('queue.connections.resque', array_merge($config, ['driver' => 'resque']));
         return new ResqueConnector();
     });
 }
开发者ID:darrylkuhn,项目名称:laravel-resque,代码行数:22,代码来源:ResqueServiceProvider.php

示例2: registerGaeConnector

 /**
  * Register the GAE queue connector.
  *
  * @param  \Illuminate\Queue\QueueManager  $manager
  * @return void
  */
 protected function registerGaeConnector($manager)
 {
     $app = $this->app;
     $manager->addConnector('gae', function () use($app) {
         return new GaeConnector($app['encrypter'], $app['request']);
     });
 }
开发者ID:wasay,项目名称:GaeSupportL5,代码行数:13,代码来源:QueueServiceProvider.php

示例3: registerSortedRedisConnector

 /**
  * @param  \Illuminate\Queue\QueueManager  $manager
  * @return void
  */
 protected function registerSortedRedisConnector($manager)
 {
     $app = $this->app;
     $manager->addConnector("sorted-redis", function () use($app) {
         return new SortedRedisConnector($app["redis"]);
     });
 }
开发者ID:kevinsimard,项目名称:laravel-sorted-queue,代码行数:11,代码来源:SortedQueueServiceProvider.php

示例4: registerResqueConnector

 /**
  * Register the Resque queue connector.
  *
  * @param \Illuminate\Queue\QueueManager $manager
  * @return void
  */
 protected function registerResqueConnector($manager)
 {
     $manager->addConnector('resque', function () {
         $config = Config::get('database.redis.default');
         Config::set('queue.connections.resque', array_merge($config, ['driver' => 'resque']));
         return new ResqueConnector();
     });
 }
开发者ID:deboorn,项目名称:laravelcommandbusresqueex,代码行数:14,代码来源:ResqueServiceProvider.php

示例5: registerConnector

 /**
  * Register the MNS queue connector.
  *
  * @param \Illuminate\Queue\QueueManager $manager
  *
  * @return void
  */
 protected function registerConnector($manager)
 {
     $manager->addConnector('mns', function () {
         return new MNSConnector();
     });
 }
开发者ID:lokielse,项目名称:laravel-mns,代码行数:13,代码来源:LaravelMNSServiceProvider.php

示例6: registerIronConnector

 /**
  * Register the IronMQ queue connector.
  *
  * @param  \Illuminate\Queue\QueueManager  $manager
  * @return void
  */
 protected function registerIronConnector($manager)
 {
     $app = $this->app;
     $manager->addConnector('iron', function () use($app) {
         return new IronConnector($app['request']);
     });
 }
开发者ID:shinichi81,项目名称:laravel4demo,代码行数:13,代码来源:QueueServiceProvider.php

示例7: registerAsyncConnector

 /**
  * Register the Async queue connector.
  *
  * @param \Illuminate\Queue\QueueManager $manager
  *
  * @return void
  */
 protected function registerAsyncConnector($manager)
 {
     $manager->addConnector('async', function () {
         return new AsyncConnector($this->app['db']);
     });
 }
开发者ID:barryvdh,项目名称:laravel-async-queue,代码行数:13,代码来源:AsyncServiceProvider.php

示例8: boot

 public function boot(QueueManager $queueManager)
 {
     $queueManager->addConnector('hredis', function () use($queueManager) {
         return new RedisConnector($this->app['redis']);
     });
 }
开发者ID:halaei,项目名称:hredis,代码行数:6,代码来源:HRedisServiceProvider.php

示例9: registerIronConnector

 /**
  * Register the IronMQ queue connector.
  *
  * @param  \Illuminate\Queue\QueueManager  $manager
  * @return void
  */
 protected function registerIronConnector($manager)
 {
     $app = $this->app;
     $manager->addConnector('iron', function () use($app) {
         return new IronConnector($app['encrypter'], $app['request']);
     });
     $this->registerIronRequestBinder();
 }
开发者ID:jordeytje,项目名称:vlamteddybeer,代码行数:14,代码来源:QueueServiceProvider.php

示例10: registerGearmanConnector

 /**
  * Register the Gearman queue connector.
  *
  * @param  \Illuminate\Queue\QueueManager  $manager
  * @return void
  */
 public function registerGearmanConnector($manager)
 {
     $manager->addConnector('gearman', function () {
         return new GearmanConnector();
     });
 }
开发者ID:gozhhu,项目名称:laravel-gearman,代码行数:12,代码来源:GearmanServiceProvider.php

示例11: registerDbRandConnector

 /**
  * Register the DbRand queue connector.
  *
  * @param \Illuminate\Queue\QueueManager $manager
  *
  * @return void
  */
 protected function registerDbRandConnector($manager)
 {
     $manager->addConnector('DbRand', function () {
         return new DbRandConnector($this->app['db']);
     });
 }
开发者ID:kgiedrius,项目名称:laravel-random-job-database-queue-driver,代码行数:13,代码来源:DbRandServiceProvider.php

示例12: registerRedisSentinelConnector

 protected function registerRedisSentinelConnector(QueueManager $manager)
 {
     $manager->addConnector('sentinel-redis', function () {
         return new SentinelConnector($this->app['redis']);
     });
 }
开发者ID:cooperaj,项目名称:laravel-redis-sentinel,代码行数:6,代码来源:RedisSentinelServiceProvider.php

示例13: boot

 public function boot(QueueManager $queueManager)
 {
     $queueManager->addConnector('hybrid', function () use($queueManager) {
         return new HybridQueueConnector($queueManager);
     });
 }
开发者ID:halaei,项目名称:hybrid-queue,代码行数:6,代码来源:HybridQueueServiceProvider.php

示例14: registerStompConnector

 /**
  * Register the Stomp queue connector.
  *
  * @param \Illuminate\Queue\QueueManager $manager
  *
  * @return void
  */
 protected function registerStompConnector($manager)
 {
     $manager->addConnector('stomp', function () {
         return new StompConnector();
     });
 }
开发者ID:mayconbordin,项目名称:l5-stomp-queue,代码行数:13,代码来源:StompServiceProvider.php

示例15: registerInternalConnector

 /**
  * Register the Internal queue connector.
  *
  * @param \Illuminate\Queue\QueueManager $manager
  *
  * @return void
  */
 protected function registerInternalConnector($manager)
 {
     $manager->addConnector('internal', function () {
         return new InternalConnector();
     });
 }
开发者ID:armxy,项目名称:laravel-internal-queue,代码行数:13,代码来源:InternalQueueServiceProvider.php


注:本文中的Illuminate\Queue\QueueManager::addConnector方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。