Completed
Push — master ( 164477...e1937a )
by
unknown
09:42 queued 10s
created

PostIndexMappingBuildEvent::getMapping()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the FOSElasticaBundle package.
5
 *
6
 * (c) FriendsOfSymfony <https://friendsofsymfony.github.com/>
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 FOS\ElasticaBundle\Configuration\IndexConfigInterface;
15
16
final class PostIndexMappingBuildEvent extends IndexEvent
17
{
18
    /**
19
     * @var IndexConfigInterface
20
     */
21
    private $indexConfig;
22
23
    /**
24
     * @var array
25
     */
26
    private $mapping;
27
28
    public function __construct(IndexConfigInterface $indexConfig, array $mapping)
29
    {
30
        $this->indexConfig = $indexConfig;
31
        $this->mapping = $mapping;
32
33
        parent::__construct($indexConfig->getName());
34
    }
35
36
    public function getIndexConfig(): IndexConfigInterface
37
    {
38
        return $this->indexConfig;
39
    }
40
41
    public function getMapping(): array
42
    {
43
        return $this->mapping;
44
    }
45
46
    public function setMapping(array $mapping): void
47
    {
48
        $this->mapping = $mapping;
49
    }
50
}
51