Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Illuminate\Bus;
4
 
5
use Carbon\CarbonImmutable;
6
use Illuminate\Contracts\Queue\Factory as QueueFactory;
7
 
8
class BatchFactory
9
{
10
    /**
11
     * The queue factory implementation.
12
     *
13
     * @var \Illuminate\Contracts\Queue\Factory
14
     */
15
    protected $queue;
16
 
17
    /**
18
     * Create a new batch factory instance.
19
     *
20
     * @param  \Illuminate\Contracts\Queue\Factory  $queue
21
     * @return void
22
     */
23
    public function __construct(QueueFactory $queue)
24
    {
25
        $this->queue = $queue;
26
    }
27
 
28
    /**
29
     * Create a new batch instance.
30
     *
31
     * @param  \Illuminate\Bus\BatchRepository  $repository
32
     * @param  string  $id
33
     * @param  string  $name
34
     * @param  int  $totalJobs
35
     * @param  int  $pendingJobs
36
     * @param  int  $failedJobs
37
     * @param  array  $failedJobIds
38
     * @param  array  $options
39
     * @param  \Carbon\CarbonImmutable  $createdAt
40
     * @param  \Carbon\CarbonImmutable|null  $cancelledAt
41
     * @param  \Carbon\CarbonImmutable|null  $finishedAt
42
     * @return \Illuminate\Bus\Batch
43
     */
44
    public function make(BatchRepository $repository,
45
                         string $id,
46
                         string $name,
47
                         int $totalJobs,
48
                         int $pendingJobs,
49
                         int $failedJobs,
50
                         array $failedJobIds,
51
                         array $options,
52
                         CarbonImmutable $createdAt,
53
                         ?CarbonImmutable $cancelledAt,
54
                         ?CarbonImmutable $finishedAt)
55
    {
56
        return new Batch($this->queue, $repository, $id, $name, $totalJobs, $pendingJobs, $failedJobs, $failedJobIds, $options, $createdAt, $cancelledAt, $finishedAt);
57
    }
58
}