master

laravel/framework

Last updated at: 29/12/2023 09:20

BatchDispatched.php

TLDR

The BatchDispatched.php file contains the BatchDispatched class, which is an event class related to the Illuminate\Bus\Batch class. It has a public property $batch and a constructor that accepts a Batch instance.

Classes

BatchDispatched

The BatchDispatched class is an event class that represents the event of a batch being dispatched. It is located in the Illuminate\Bus\Events namespace. This class has the following properties and methods:

Properties

  • $batch: A public property that holds the Batch instance associated with the event.

Methods

  • __construct(Batch $batch): A constructor method that accepts a Batch instance as a parameter and initializes the $batch property of the class.
<?php

namespace Illuminate\Bus\Events;

use Illuminate\Bus\Batch;

class BatchDispatched
{
    /**
     * The batch instance.
     *
     * @var \Illuminate\Bus\Batch
     */
    public $batch;

    /**
     * Create a new event instance.
     *
     * @param  \Illuminate\Bus\Batch  $batch
     * @return void
     */
    public function __construct(Batch $batch)
    {
        $this->batch = $batch;
    }
}