1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the AsmTranslationLoaderBundle package. |
5
|
|
|
* |
6
|
|
|
* (c) Marc Aschmann <[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 Asm\TranslationLoaderBundle\Model; |
13
|
|
|
|
14
|
|
|
/** |
15
|
|
|
* Base implementation of the {@link TranslationInterface} (can be extended by |
16
|
|
|
* concrete storage layer implementations). |
17
|
|
|
* |
18
|
|
|
* @author Christian Flothmann <[email protected]> |
19
|
|
|
*/ |
20
|
|
|
abstract class Translation implements TranslationInterface |
21
|
|
|
{ |
22
|
|
|
/** |
23
|
|
|
* @var string |
24
|
|
|
*/ |
25
|
|
|
protected $transKey; |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* @var string |
29
|
|
|
*/ |
30
|
|
|
protected $transLocale; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* @var string |
34
|
|
|
*/ |
35
|
|
|
protected $messageDomain; |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* @var string |
39
|
|
|
*/ |
40
|
|
|
protected $translation; |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @var \DateTime |
44
|
|
|
*/ |
45
|
|
|
protected $dateCreated; |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* @var \DateTime |
49
|
|
|
*/ |
50
|
|
|
protected $dateUpdated; |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* {@inheritDoc} |
54
|
|
|
*/ |
55
|
16 |
|
public function setTransKey($transKey) |
56
|
|
|
{ |
57
|
16 |
|
$this->transKey = $transKey; |
58
|
|
|
|
59
|
16 |
|
return $this; |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* {@inheritDoc} |
64
|
|
|
*/ |
65
|
16 |
|
public function getTransKey() |
66
|
|
|
{ |
67
|
16 |
|
return $this->transKey; |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* {@inheritDoc} |
72
|
|
|
*/ |
73
|
13 |
|
public function setTransLocale($transLocale) |
74
|
|
|
{ |
75
|
13 |
|
$this->transLocale = $transLocale; |
76
|
|
|
|
77
|
13 |
|
return $this; |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* {@inheritDoc} |
82
|
|
|
*/ |
83
|
11 |
|
public function getTransLocale() |
84
|
|
|
{ |
85
|
11 |
|
return $this->transLocale; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* {@inheritDoc} |
90
|
|
|
*/ |
91
|
11 |
|
public function setMessageDomain($messageDomain) |
92
|
|
|
{ |
93
|
11 |
|
$this->messageDomain = $messageDomain; |
94
|
|
|
|
95
|
11 |
|
return $this; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* {@inheritDoc} |
100
|
|
|
*/ |
101
|
11 |
|
public function getMessageDomain() |
102
|
|
|
{ |
103
|
11 |
|
return $this->messageDomain; |
104
|
|
|
} |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* {@inheritDoc} |
108
|
|
|
*/ |
109
|
16 |
|
public function setTranslation($translation) |
110
|
|
|
{ |
111
|
16 |
|
$this->translation = $translation; |
112
|
|
|
|
113
|
16 |
|
return $this; |
114
|
|
|
} |
115
|
|
|
|
116
|
|
|
/** |
117
|
|
|
* {@inheritDoc} |
118
|
|
|
*/ |
119
|
16 |
|
public function getTranslation() |
120
|
|
|
{ |
121
|
16 |
|
return $this->translation; |
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
/** |
125
|
|
|
* {@inheritDoc} |
126
|
|
|
*/ |
127
|
2 |
|
public function setDateCreated(\DateTime $dateCreated = null) |
128
|
|
|
{ |
129
|
2 |
|
$this->dateCreated = $dateCreated; |
130
|
|
|
|
131
|
2 |
|
return $this; |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
/** |
135
|
|
|
* {@inheritDoc} |
136
|
|
|
*/ |
137
|
1 |
|
public function getDateCreated() |
138
|
|
|
{ |
139
|
1 |
|
return $this->dateCreated; |
140
|
|
|
} |
141
|
|
|
|
142
|
|
|
/** |
143
|
|
|
* {@inheritDoc} |
144
|
|
|
*/ |
145
|
3 |
|
public function setDateUpdated(\DateTime $dateUpdated = null) |
146
|
|
|
{ |
147
|
3 |
|
$this->dateUpdated = $dateUpdated; |
148
|
|
|
|
149
|
3 |
|
return $this; |
150
|
|
|
} |
151
|
|
|
|
152
|
|
|
/** |
153
|
|
|
* {@inheritDoc} |
154
|
|
|
*/ |
155
|
1 |
|
public function getDateUpdated() |
156
|
|
|
{ |
157
|
1 |
|
return $this->dateUpdated; |
158
|
|
|
} |
159
|
|
|
} |
160
|
|
|
|