示例#1
0
 public function __construct(HandlerInterface $handler, callable $task, array $args = [])
 {
     if ($handler->getTaskId()) {
         throw new \InvalidArgumentException('$handler already has a TaskId set');
     }
     array_unshift($args, $handler);
     $this->handler = $handler;
     $this->task = $task;
     $this->args = $args;
 }