PendingBatch
class PendingBatch (View source)
Properties
| protected Container | $container | The IoC container instance.  | 
                |
| string | $name | The batch name.  | 
                |
| Collection | $jobs | The jobs that belong to the batch.  | 
                |
| array | $options | The batch options.  | 
                
Methods
Add jobs to the batch.
Add a callback to be executed after all jobs in the batch have executed successfully.
Get the "then" callbacks that have been registered with the pending batch.
Add a callback to be executed after the first failing job in the batch.
Get the "catch" callbacks that have been registered with the pending batch.
Add a callback to be executed after the batch has finished executing.
Get the "finally" callbacks that have been registered with the pending batch.
Indicate that the batch should not be cancelled when a job within the batch fails.
Determine if the pending batch allows jobs to fail without cancelling the batch.
Set the name for the batch.
Specify the queue connection that the batched jobs should run on.
Get the connection used by the pending batch.
Specify the queue that the batched jobs should run on.
Get the queue used by the pending batch.
Add additional data into the batch's options array.
Dispatch the batch after the response is sent to the browser.
Details
        
                            void
    __construct(Container $container, Collection $jobs)
        
    
    Create a new pending batch instance.
        
                            $this
    add(iterable|object|array $jobs)
        
    
    Add jobs to the batch.
        
                            $this
    then(callable $callback)
        
    
    Add a callback to be executed after all jobs in the batch have executed successfully.
        
                            array
    thenCallbacks()
        
    
    Get the "then" callbacks that have been registered with the pending batch.
        
                            $this
    catch(callable $callback)
        
    
    Add a callback to be executed after the first failing job in the batch.
        
                            array
    catchCallbacks()
        
    
    Get the "catch" callbacks that have been registered with the pending batch.
        
                            $this
    finally(callable $callback)
        
    
    Add a callback to be executed after the batch has finished executing.
        
                            array
    finallyCallbacks()
        
    
    Get the "finally" callbacks that have been registered with the pending batch.
        
                            $this
    allowFailures(bool $allowFailures = true)
        
    
    Indicate that the batch should not be cancelled when a job within the batch fails.
        
                            bool
    allowsFailures()
        
    
    Determine if the pending batch allows jobs to fail without cancelling the batch.
        
                            $this
    name(string $name)
        
    
    Set the name for the batch.
        
                            $this
    onConnection(string $connection)
        
    
    Specify the queue connection that the batched jobs should run on.
        
                            string|null
    connection()
        
    
    Get the connection used by the pending batch.
        
                            $this
    onQueue(string $queue)
        
    
    Specify the queue that the batched jobs should run on.
        
                            string|null
    queue()
        
    
    Get the queue used by the pending batch.
        
                            $this
    withOption(string $key, mixed $value)
        
    
    Add additional data into the batch's options array.
        
                            Batch
    dispatch()
        
    
    Dispatch the batch.
        
                            Batch
    dispatchAfterResponse()
        
    
    Dispatch the batch after the response is sent to the browser.
        
                    protected        void
    dispatchExistingBatch(Batch $batch)
        
    
    Dispatch an existing batch.