php Illuminate-Queue-SyncQueue类(方法)实例源码

下面列出了php Illuminate-Queue-SyncQueue 类(方法)源码代码实例,从而了解它的用法。

作者:adamnicholso    项目:kye   
public function test_queue_with_synchronous_driver_and_in_memory_pubsub_fires_event_with_expected_return_value()
 {
     $pubsub = new InMemoryPubSub();
     $container = new Container();
     $container->singleton(IlluminateQueueHandler::class, function () use($pubsub) {
         return new IlluminateQueueHandler($pubsub, new Serializer());
     });
     $driver = new SyncQueue();
     $driver->setContainer($container);
     $called = false;
     $pubsub->on('kyew:task:random-task-id', function ($publishedValue) use(&$called) {
         $this->assertEquals('foo!bar!', $publishedValue);
         $called = true;
     });
     $queue = new IlluminateQueue($driver, new Serializer());
     $queue->push('random-task-id', function () {
         return 'foo!bar!';
     });
     $this->assertTrue($called);
 }

作者:satriash    项目:tou   
/**
  * Set the encrypter instance.
  *
  * @param \Illuminate\Contracts\Encryption\Encrypter $crypt
  * @return void 
  * @static 
  */
 public static function setEncrypter($crypt)
 {
     //Method inherited from \Illuminate\Queue\Queue
     \Illuminate\Queue\SyncQueue::setEncrypter($crypt);
 }

作者:jorzhikgi    项目:MLM-Nexu   
/**
  * Set the IoC container instance.
  *
  * @param \Illuminate\Container\Container $container
  * @return void 
  * @static 
  */
 public static function setContainer($container)
 {
     //Method inherited from \Illuminate\Queue\Queue
     \Illuminate\Queue\SyncQueue::setContainer($container);
 }


问题


面经


文章

微信
公众号

扫码关注公众号