Completed
Pull Request — master (#993)
by David
16:22
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 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
ccs 0
cts 0
cp 0
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
/**
4
 * This file is part of the FOSElasticaBundle project.
5
 *
6
 * (c) Infinite Networks Pty Ltd <http://www.infinite.net.au>
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 Symfony\Component\EventDispatcher\Event;
15
16
class TransformEvent extends Event
17
{
18
    const POST_TRANSFORM = 'fos_elastica.post_transform';
19
20
    /**
21
     * @var mixed
22
     */
23
    private $document;
24
25
    /**
26
     * @var array
27
     */
28
    private $fields;
29
30
    /**
31
     * @var mixed
32
     */
33
    private $object;
34
35
    /**
36
     * @param mixed $document
37
     * @param array $fields
38
     * @param mixed $object
39
     */
40 3
    public function __construct($document, array $fields, $object)
41
    {
42 3
        $this->document = $document;
43 3
        $this->fields = $fields;
44 3
        $this->object = $object;
45 3
    }
46
47
    /**
48
     * @return mixed
49
     */
50 3
    public function getDocument()
51
    {
52 3
        return $this->document;
53
    }
54
55
    /**
56
     * @return array
57
     */
58
    public function getFields()
59
    {
60
        return $this->fields;
61
    }
62
63
    /**
64
     * @return mixed
65
     */
66
    public function getObject()
67
    {
68
        return $this->object;
69
    }
70
71
    /**
72
     * @param mixed $document
73
     */
74
    public function setDocument($document)
75
    {
76
        $this->document = $document;
77
    }
78
}
79