Completed
Push — master ( de2382...5d49dc )
by Lucas
15:10
created

TranslatablePersistEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 56
ccs 0
cts 13
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getLocale() 0 4 1
A getDomain() 0 4 1
A __construct() 0 5 1
1
<?php
2
/**
3
 * event object for the translatable.persist event
4
 */
5
6
namespace Graviton\I18nBundle\Event;
7
8
use Symfony\Component\EventDispatcher\Event;
9
10
/**
11
 * @author   List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
12
 * @license  http://opensource.org/licenses/gpl-license.php GNU Public License
13
 * @link     http://swisscom.ch
14
 */
15
final class TranslatablePersistEvent extends Event
16
{
17
18
    /**
19
     * our event name
20
     *
21
     * @var string
22
     */
23
    const EVENT_NAME = 'translatable.persist';
24
25
    /**
26
     * locale
27
     *
28
     * @var string
29
     */
30
    private $locale;
31
32
    /**
33
     * domain
34
     *
35
     * @var string
36
     */
37
    private $domain;
38
39
    /**
40
     * constructor
41
     *
42
     * @param string $locale locale
43
     * @param string $domain domain
44
     */
45
    public function __construct($locale, $domain)
46
    {
47
        $this->locale = $locale;
48
        $this->domain = $domain;
49
    }
50
51
    /**
52
     * get locale
53
     *
54
     * @return string locale
55
     */
56
    public function getLocale()
57
    {
58
        return $this->locale;
59
    }
60
61
    /**
62
     * get domain
63
     *
64
     * @return string domain
65
     */
66
    public function getDomain()
67
    {
68
        return $this->domain;
69
    }
70
}
71