* For the full copyright and license information, please view the LICENSE
9
* file that was distributed with this source code.
10
*/
11
12
namespace FOS\ElasticaBundle\Persister\Event;
13
14
use FOS\ElasticaBundle\Persister\ObjectPersisterInterface;
15
use FOS\ElasticaBundle\Provider\PagerInterface;
16
use Symfony\Contracts\EventDispatcher\Event;
17
18
final class PostAsyncInsertObjectsEvent extends Event implements PersistEvent
19
{
20
/**
21
* @var PagerInterface
22
*/
23
private $pager;
24
25
/**
26
* @var ObjectPersisterInterface
27
*/
28
private $objectPersister;
29
30
/**
31
* @var int
32
*/
33
private $objectsCount;
34
35
/**
36
* @var string|null
37
*/
38
private $errorMessage;
39
40
/**
41
* @var array
42
*/
43
private $options;
44
45
6
public function __construct(PagerInterface $pager, ObjectPersisterInterface $objectPersister, int $objectsCount, ?string $errorMessage, array $options)
46
{
47
6
$this->pager = $pager;
48
6
$this->objectPersister = $objectPersister;
49
6
$this->objectsCount = $objectsCount;
50
6
$this->errorMessage = $errorMessage;
51
6
$this->options = $options;
52
6
}
53
54
1
public function getPager(): PagerInterface
55
{
56
1
return $this->pager;
57
}
58
59
1
public function getOptions(): array
60
{
61
1
return $this->options;
62
}
63
64
1
public function getObjectPersister(): ObjectPersisterInterface