ConfigurationEvent::getConfiguration()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Pim\Bundle\CustomEntityBundle\Event;
4
5
use Pim\Bundle\CustomEntityBundle\Configuration\ConfigurationInterface;
6
use Symfony\Component\EventDispatcher\Event;
7
use Symfony\Component\OptionsResolver\OptionsResolver;
8
9
/**
10
 * Launched upon custom entity options configuration
11
 *
12
 * @author    Antoine Guigan <[email protected]>
13
 * @copyright 2014 Akeneo SAS (http://www.akeneo.com)
14
 * @license   http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
15
 */
16
class ConfigurationEvent extends Event
17
{
18
    /**
19
     * @var ConfigurationInterface
20
     */
21
    protected $configuration;
22
23
    /**
24
     * @var OptionsResolver
25
     */
26
    protected $optionsResolver;
27
28
    /**
29
     * Constructor
30
     *
31
     * @param ConfigurationInterface $configuration
32
     * @param OptionsResolver        $optionsResolver
33
     */
34
    public function __construct(ConfigurationInterface $configuration, OptionsResolver $optionsResolver)
35
    {
36
        $this->configuration = $configuration;
37
        $this->optionsResolver = $optionsResolver;
38
    }
39
40
    /**
41
     * Returns the configuration
42
     *
43
     * @return ConfigurationInterface
44
     */
45
    public function getConfiguration()
46
    {
47
        return $this->configuration;
48
    }
49
50
    /**
51
     * Returns the options resolver
52
     *
53
     * @return OptionsResolver
54
     */
55
    public function getOptionsResolver()
56
    {
57
        return $this->optionsResolver;
58
    }
59
}
60