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

src/Event/TransformEvent.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
3
/*
4
 * This file is part of the FOSElasticaBundle package.
5
 *
6
 * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
7
 *
8
 * 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\Event;
13
14
use Elastica\Document;
15
use Symfony\Component\EventDispatcher\Event;
16
17
class TransformEvent extends Event
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...
18
{
19
    /**
20
     * @Event("FOS\ElasticaBundle\Event\TransformEvent")
21
     */
22
    const PRE_TRANSFORM = 'fos_elastica.pre_transform';
23
24
    /**
25
     * @Event("FOS\ElasticaBundle\Event\TransformEvent")
26
     */
27
    const POST_TRANSFORM = 'fos_elastica.post_transform';
28
29
    /**
30
     * @var Document
31
     */
32
    private $document;
33
34
    /**
35
     * @var array
36
     */
37
    private $fields;
38
39
    /**
40
     * @var object
41
     */
42
    private $object;
43
44
    /**
45
     * @param mixed $document
46
     * @param array $fields
47
     * @param object $object
48
     */
49 6
    public function __construct($document, array $fields, $object)
50
    {
51 6
        $this->document = $document;
52 6
        $this->fields = $fields;
53 6
        $this->object = $object;
54 6
    }
55
56
    /**
57
     * @return Document
58
     */
59 4
    public function getDocument()
60
    {
61 4
        return $this->document;
62
    }
63
64
    /**
65
     * @return array
66
     */
67 1
    public function getFields()
68
    {
69 1
        return $this->fields;
70
    }
71
72
    /**
73
     * @return object
74
     */
75 1
    public function getObject()
76
    {
77 1
        return $this->object;
78
    }
79
80
    /**
81
     * @param Document $document
82
     */
83 1
    public function setDocument($document)
84
    {
85 1
        $this->document = $document;
86 1
    }
87
}
88