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


PHP Queue::pushOn方法代码示例

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


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

示例1: queue

 /**
  * Queue a new e-mail message for sending.
  *
  * @param  string|array  $view
  * @param  array  $data
  * @param  \Closure|string  $callback
  * @param  string|null  $queue
  * @return mixed
  */
 public function queue($view, array $data = [], $callback = null, $queue = null)
 {
     if ($view instanceof MailableContract) {
         return $view->queue($this->queue);
     }
     return $this->queue->pushOn($queue, new Jobs\HandleQueuedMessage($view, $data, $callback));
 }
开发者ID:bryanashley,项目名称:framework,代码行数:16,代码来源:Mailer.php

示例2: queue

 /**
  * @param string $queue
  * @param string|null $subject
  * @param string|null $template
  * @return bool
  */
 public function queue($queue, $subject = null, $template = null)
 {
     if (null !== $subject) {
         $this->setSubject($subject);
     }
     if (null !== $template) {
         $this->setTemplate($template);
     }
     $this->queue->pushOn($queue, new Job($this->getData()));
     return true;
 }
开发者ID:HydrefLab,项目名称:laravel-mailer,代码行数:17,代码来源:Mailer.php

示例3: pushCommandToQueue

 /**
  * Push the command onto the given queue instance.
  *
  * @param  \Illuminate\Contracts\Queue\Queue  $queue
  * @param  mixed  $command
  * @return mixed
  */
 protected function pushCommandToQueue($queue, $command)
 {
     if (isset($command->queue, $command->delay)) {
         return $queue->laterOn($command->queue, $command->delay, $command);
     }
     if (isset($command->queue)) {
         return $queue->pushOn($command->queue, $command);
     }
     if (isset($command->delay)) {
         return $queue->later($command->delay, $command);
     }
     return $queue->push('Ahead4\\Bus\\CallQueuedHandler@call', ['pipes' => $this->pipes, 'command' => serialize($command)]);
 }
开发者ID:ahead4,项目名称:bus,代码行数:20,代码来源:Dispatcher.php

示例4: pushCommandToQueue

 /**
  * Push the command onto the given queue instance.
  *
  * @param  \Illuminate\Contracts\Queue\Queue  $queue
  * @param  mixed  $command
  * @return mixed
  */
 protected function pushCommandToQueue($queue, $command)
 {
     if (isset($command->queue, $command->delay)) {
         return $queue->laterOn($command->queue, $command->delay, $command);
     }
     if (isset($command->queue)) {
         return $queue->pushOn($command->queue, $command);
     }
     if (isset($command->delay)) {
         return $queue->later($command->delay, $command);
     }
     return $queue->push($command);
 }
开发者ID:focuslife,项目名称:v0.1,代码行数:20,代码来源:Dispatcher.php

示例5: it_pushes_mail_to_queue

 public function it_pushes_mail_to_queue(Queue $queue)
 {
     $recipient = new Recipient('Jane Doe', 'janedoe@example.com');
     $variableOne = new Variable('global_one', 'Example');
     $variableTwo = new Variable('global_two', 'Another example');
     $variableThree = new Variable('local', 'Yet another example');
     $attachment = new Attachment('text/csv', 'test.csv', 'example;test;');
     $data = ['from_name' => 'John Doe', 'from_email' => 'johndoe@example.com', 'subject' => 'Example subject', 'template' => 'example template', 'recipients' => [new Recipient('Jane Doe', 'janedoe@example.com')], 'global_vars' => ['global_one' => ['name' => 'GLOBAL_ONE', 'content' => 'Example'], 'global_two' => ['name' => 'GLOBAL_TWO', 'content' => 'Another example']], 'local_vars' => ['janedoe@example.com' => ['local' => ['name' => 'LOCAL', 'content' => 'Yet another example']]], 'headers' => [], 'attachments' => [['type' => 'text/csv', 'name' => 'test.csv', 'content' => 'ZXhhbXBsZTt0ZXN0Ow==']]];
     $this->setSubject('Example subject');
     $this->setTemplate('example template');
     $this->addRecipient($recipient);
     $this->addGlobalVariable($variableOne);
     $this->addGlobalVariable($variableTwo);
     $this->addLocalVariable($recipient, $variableThree);
     $this->addAttachment($attachment);
     $job = new Job($data);
     $queue->pushOn('mandrill', $job)->shouldBeCalled();
     $this->queue('mandrill')->shouldReturn(true);
 }
开发者ID:HydrefLab,项目名称:laravel-mailer,代码行数:19,代码来源:MailerSpec.php

示例6: queue

 /**
  * Push command to queue.
  *
  * @param \Illuminate\Contracts\Queue\Queue $queue
  * @param \Krucas\Counter\Integration\Laravel\Commands\Base $command
  * @return void
  */
 public function queue(Queue $queue, Base $command)
 {
     if (!is_null($this->queue)) {
         $queue->pushOn($this->queue, $command);
     } else {
         $queue->push($command);
     }
 }
开发者ID:edvinaskrucas,项目名称:counter-laravel,代码行数:15,代码来源:Base.php


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