Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request from GHSA-vx6j-pjrh-vgjh
- Loading branch information
1 parent
bb892d7
commit 9c948f9
Showing
3 changed files
with
65 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/Sulu/Bundle/RouteBundle/Generator/TranslatorWrapper.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
namespace Sulu\Bundle\RouteBundle\Generator; | ||
|
||
use Symfony\Component\Translation\TranslatorInterface; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
class TranslatorWrapper implements TranslatorInterface | ||
{ | ||
/** | ||
* @var TranslatorInterface | ||
*/ | ||
private $translator; | ||
|
||
public function __construct(TranslatorInterface $translator) | ||
{ | ||
$this->translator = $translator; | ||
} | ||
|
||
public function trans($id, array $parameters = [], $domain = null, $locale = null) | ||
{ | ||
return $this->translator->trans($id, $parameters, $domain, $locale); | ||
} | ||
|
||
public function transChoice($id, $number, array $parameters = [], $domain = null, $locale = null) | ||
{ | ||
return $this->translator->transChoice($id, $number, $parameters, $domain, $locale); | ||
} | ||
|
||
public function setLocale($locale) | ||
{ | ||
throw new \Exception('Not supported.'); | ||
} | ||
|
||
public function getLocale() | ||
{ | ||
return $this->translator->getLocale(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters