Completed
Pull Request — master (#1411)
by Floran
09:07
created

TransformEvent::getFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
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
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 3
    public function __construct($document, array $fields, $object)
50
    {
51 3
        $this->document = $document;
52 3
        $this->fields = $fields;
53 3
        $this->object = $object;
54 3
    }
55
56
    /**
57
     * @return Document
58
     */
59 3
    public function getDocument()
60
    {
61 3
        return $this->document;
62
    }
63
64
    /**
65
     * @return array
66
     */
67
    public function getFields()
68
    {
69
        return $this->fields;
70
    }
71
72
    /**
73
     * @return object
74
     */
75
    public function getObject()
76
    {
77
        return $this->object;
78
    }
79
80
    /**
81
     * @param Document $document
82
     */
83
    public function setDocument($document)
84
    {
85
        $this->document = $document;
86
    }
87
}
88