Completed
Push — master ( 51b986...23baca )
by Simonas
103:55 queued 96:58
created

BulkEvent::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 BulkEvent 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
     * @param string       $operation
35
     * @param string|array $type
36
     * @param array        $query
37
     */
38
    public function __construct($operation, $type, array $query)
39
    {
40
        $this->type = $type;
41
        $this->query = $query;
42
        $this->operation = $operation;
43
    }
44
45
    /**
46
     * @return array|string
47
     */
48
    public function getType()
49
    {
50
        return $this->type;
51
    }
52
53
    /**
54
     * @param array|string $type
55
     */
56
    public function setType($type)
57
    {
58
        $this->type = $type;
59
    }
60
61
    /**
62
     * @return array
63
     */
64
    public function getQuery()
65
    {
66
        return $this->query;
67
    }
68
69
    /**
70
     * @param array $query
71
     */
72
    public function setQuery($query)
73
    {
74
        $this->query = $query;
75
    }
76
77
    /**
78
     * @return array
79
     */
80
    public function getOperation()
81
    {
82
        return $this->operation;
83
    }
84
85
    /**
86
     * @param string $operation
87
     */
88
    public function setOperation($operation)
89
    {
90
        $this->operation = $operation;
91
    }
92
}
93