Completed
Push — upgrade ( e29d4e...a26676 )
by Simonas
01:42
created

PostCreateClientEvent::setIndexConfig()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
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 Elasticsearch\ClientBuilder;
15
use Symfony\Component\EventDispatcher\Event;
16
17
class PostCreateClientEvent extends Event
18
{
19
    private $client;
20
    private $indexConfig;
21
22
    public function __construct(ClientBuilder $client, array $indexConfig = [])
23
    {
24
        $this->client = $client;
25
        $this->indexConfig = $indexConfig;
26
    }
27
28
    public function getClient(): ClientBuilder
29
    {
30
        return $this->client;
31
    }
32
33
    public function setClient(ClientBuilder $client): PostCreateClientEvent
34
    {
35
        $this->client = $client;
36
        return $this;
37
    }
38
39
    public function getIndexConfig(): array
40
    {
41
        return $this->indexConfig;
42
    }
43
44
    public function setIndexConfig(array $indexConfig): PostCreateClientEvent
45
    {
46
        $this->indexConfig = $indexConfig;
47
        return $this;
48
    }
49
}
50