Completed
Push — master ( ca8ded...dc27cf )
by Karel
22s queued 11s
created

src/Persister/Event/PreInsertObjectsEvent.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
namespace FOS\ElasticaBundle\Persister\Event;
3
4
use FOS\ElasticaBundle\Persister\ObjectPersisterInterface;
5
use FOS\ElasticaBundle\Provider\PagerInterface;
6
use Symfony\Component\EventDispatcher\Event;
7
8
final class PreInsertObjectsEvent extends Event implements PersistEvent
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Component\EventDispatcher\Event has been deprecated with message: since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
9
{
10
    /**
11
     * @var PagerInterface
12
     */
13
    private $pager;
14
15
    /**
16
     * @var ObjectPersisterInterface
17
     */
18
    private $objectPersister;
19
20
    /**
21
     * @var object[]
22
     */
23
    private $objects;
24
25
    /**
26
     * @var array
27
     */
28
    private $options;
29
30 22 View Code Duplication
    public function __construct(PagerInterface $pager, ObjectPersisterInterface $objectPersister, array $objects, array $options)
31
    {
32 22
        $this->pager = $pager;
33 22
        $this->objectPersister = $objectPersister;
34 22
        $this->objects = $objects;
35 22
        $this->options = $options;
36 22
    }
37
38
    /**
39
     * @return PagerInterface
40
     */
41 12
    public function getPager()
42
    {
43 12
        return $this->pager;
44
    }
45
46
    /**
47
     * @param PagerInterface $pager
48
     */
49 1
    public function setPager($pager)
50
    {
51 1
        $this->pager = $pager;
52 1
    }
53
54
    /**
55
     * @return array
56
     */
57 15
    public function getOptions()
58
    {
59 15
        return $this->options;
60
    }
61
62
    /**
63
     * @param array $options
64
     */
65 1
    public function setOptions(array $options)
66
    {
67 1
        $this->options = $options;
68 1
    }
69
70
    /**
71
     * @return ObjectPersisterInterface
72
     */
73 3
    public function getObjectPersister()
74
    {
75 3
        return $this->objectPersister;
76
    }
77
78
    /**
79
     * @param ObjectPersisterInterface $objectPersister
80
     */
81 1
    public function setObjectPersister(ObjectPersisterInterface $objectPersister)
82
    {
83 1
        $this->objectPersister = $objectPersister;
84 1
    }
85
86
    /**
87
     * @return object[]
88
     */
89 15
    public function getObjects()
90
    {
91 15
        return $this->objects;
92
    }
93
94
    /**
95
     * @param object[] $objects
96
     */
97 3
    public function setObjects($objects)
98
    {
99 3
        $this->objects = $objects;
100
    }
101
}