mirror of
https://github.com/flarum/framework.git
synced 2024-12-11 21:43:38 +08:00
Fix fatal error
"PHP Fatal error: Cannot use Symfony\Component\Translation\Translator as Translator because the name is already in use"
This commit is contained in:
parent
8e94c87683
commit
553a49af56
|
@ -10,12 +10,12 @@
|
||||||
|
|
||||||
namespace Flarum\Locale;
|
namespace Flarum\Locale;
|
||||||
|
|
||||||
use Symfony\Component\Translation\Translator;
|
use Symfony\Component\Translation\Translator as SymfonyTranslator;
|
||||||
|
|
||||||
class LocaleManager
|
class LocaleManager
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var Translator
|
* @var SymfonyTranslator
|
||||||
*/
|
*/
|
||||||
protected $translator;
|
protected $translator;
|
||||||
|
|
||||||
|
@ -24,9 +24,9 @@ class LocaleManager
|
||||||
protected $js = [];
|
protected $js = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Translator $translator
|
* @param SymfonyTranslator $translator
|
||||||
*/
|
*/
|
||||||
public function __construct(Translator $translator)
|
public function __construct(SymfonyTranslator $translator)
|
||||||
{
|
{
|
||||||
$this->translator = $translator;
|
$this->translator = $translator;
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ class LocaleManager
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Translator
|
* @return SymfonyTranslator
|
||||||
*/
|
*/
|
||||||
public function getTranslator()
|
public function getTranslator()
|
||||||
{
|
{
|
||||||
|
@ -88,9 +88,9 @@ class LocaleManager
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Translator $translator
|
* @param SymfonyTranslator $translator
|
||||||
*/
|
*/
|
||||||
public function setTranslator($translator)
|
public function setTranslator(SymfonyTranslator $translator)
|
||||||
{
|
{
|
||||||
$this->translator = $translator;
|
$this->translator = $translator;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user