Completed
Pull Request — master (#1054)
by
unknown
14:26 queued 11:52
created

TransformEvent::getDocument()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
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 PRE_TRANSFORM = 'fos_elastica.pre_transform';
19
    const POST_TRANSFORM = 'fos_elastica.post_transform';
20
21
    /**
22
     * @var mixed
23
     */
24
    private $document;
25
26
    /**
27
     * @var array
28
     */
29
    private $fields;
30
31
    /**
32
     * @var mixed
33
     */
34
    private $object;
35
36
    /**
37
     * @param mixed $document
38
     * @param array $fields
39
     * @param mixed $object
40
     */
41 3
    public function __construct($document, array $fields, $object)
42
    {
43 3
        $this->document = $document;
44 3
        $this->fields = $fields;
45 3
        $this->object = $object;
46 3
    }
47
48
    /**
49
     * @return mixed
50
     */
51 3
    public function getDocument()
52
    {
53 3
        return $this->document;
54
    }
55
56
    /**
57
     * @return array
58
     */
59
    public function getFields()
60
    {
61
        return $this->fields;
62
    }
63
64
    /**
65
     * @return mixed
66
     */
67
    public function getObject()
68
    {
69
        return $this->object;
70
    }
71
72
    /**
73
     * @param mixed $document
74
     */
75
    public function setDocument($document)
76
    {
77
        $this->document = $document;
78
    }
79
}
80