本文整理汇总了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();
});
}
示例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']);
});
}
示例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"]);
});
}
示例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();
});
}
示例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();
});
}
示例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']);
});
}
示例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']);
});
}
示例8: boot
public function boot(QueueManager $queueManager)
{
$queueManager->addConnector('hredis', function () use($queueManager) {
return new RedisConnector($this->app['redis']);
});
}
示例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();
}
示例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();
});
}
示例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']);
});
}
示例13: boot
public function boot(QueueManager $queueManager)
{
$queueManager->addConnector('hybrid', function () use($queueManager) {
return new HybridQueueConnector($queueManager);
});
}
示例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();
});
}
示例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();
});
}