Completed
Pull Request — master (#615)
by
unknown
02:55
created

OperationEvent::getType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the ONGR package.
5
 *
6
 * (c) NFQ Technologies UAB <[email protected]>
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 ONGR\ElasticsearchBundle\Event;
13
14
use Symfony\Component\EventDispatcher\Event;
15
16
class OperationEvent extends Event
17
{
18
    /**
19
     * @var string
20
     */
21
    private $operation;
22
23
    /**
24
     * @var string|array
25
     */
26
    private $type;
27
28
    /**
29
     * @var array
30
     */
31
    private $query;
32
33
    /**
34
     * Constructor
35
     *
36
     * @param string       $operation
37
     * @param string|array $type
38
     * @param array        $query
39
     */
40
    public function __construct($operation, $type, array $query)
41
    {
42
        $this->operation = $operation;
43
        $this->type = $type;
44
        $this->query = $query;
45
    }
46
47
    /**
48
     * Returns operation
49
     *
50
     * @return string
51
     */
52
    public function getOperation()
53
    {
54
        return $this->operation;
55
    }
56
57
    /**
58
     * Returns type
59
     *
60
     * @return array|string
61
     */
62
    public function getType()
63
    {
64
        return $this->type;
65
    }
66
67
    /**
68
     * Returns query
69
     *
70
     * @return array
71
     */
72
    public function getQuery()
73
    {
74
        return $this->query;
75
    }
76
}
77