|
@@ 142-151 (lines=10) @@
|
| 139 |
|
* |
| 140 |
|
* @throws \InvalidArgumentException |
| 141 |
|
*/ |
| 142 |
|
protected function getLoader($format) |
| 143 |
|
{ |
| 144 |
|
$service = sprintf('translation.loader.%s', $format); |
| 145 |
|
|
| 146 |
|
if (!$this->getContainer()->has($service)) { |
| 147 |
|
throw new \InvalidArgumentException(sprintf('Unable to find Symfony Translation loader for format "%s"', $format)); |
| 148 |
|
} |
| 149 |
|
|
| 150 |
|
return $this->getContainer()->get($service); |
| 151 |
|
} |
| 152 |
|
|
| 153 |
|
/** |
| 154 |
|
* Returns Symfony requested format dumper |
|
@@ 162-171 (lines=10) @@
|
| 159 |
|
* |
| 160 |
|
* @throws \InvalidArgumentException |
| 161 |
|
*/ |
| 162 |
|
protected function getDumper($format) |
| 163 |
|
{ |
| 164 |
|
$service = sprintf('translation.dumper.%s', $format); |
| 165 |
|
|
| 166 |
|
if (!$this->getContainer()->has($service)) { |
| 167 |
|
throw new \InvalidArgumentException(sprintf('Unable to find Symfony Translation dumper for format "%s"', $format)); |
| 168 |
|
} |
| 169 |
|
|
| 170 |
|
return $this->getContainer()->get($service); |
| 171 |
|
} |
| 172 |
|
|
| 173 |
|
/** |
| 174 |
|
* Returns translation path |