Laravel version update
Laravel version update
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
|
||||
namespace Symfony\Component\Translation;
|
||||
|
||||
use Symfony\Component\Translation\Exception\InvalidArgumentException;
|
||||
|
||||
/**
|
||||
* @author Abdellatif Ait boudad <a.aitboudad@gmail.com>
|
||||
*/
|
||||
@@ -25,9 +27,6 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter
|
||||
*/
|
||||
private $translator;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $messages = array();
|
||||
|
||||
/**
|
||||
@@ -36,7 +35,7 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter
|
||||
public function __construct(TranslatorInterface $translator)
|
||||
{
|
||||
if (!$translator instanceof TranslatorBagInterface) {
|
||||
throw new \InvalidArgumentException(sprintf('The Translator "%s" must implement TranslatorInterface and TranslatorBagInterface.', get_class($translator)));
|
||||
throw new InvalidArgumentException(sprintf('The Translator "%s" must implement TranslatorInterface and TranslatorBagInterface.', \get_class($translator)));
|
||||
}
|
||||
|
||||
$this->translator = $translator;
|
||||
@@ -88,12 +87,26 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter
|
||||
return $this->translator->getCatalogue($locale);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the fallback locales.
|
||||
*
|
||||
* @return array $locales The fallback locales
|
||||
*/
|
||||
public function getFallbackLocales()
|
||||
{
|
||||
if ($this->translator instanceof Translator || method_exists($this->translator, 'getFallbackLocales')) {
|
||||
return $this->translator->getFallbackLocales();
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Passes through all unknown calls onto the translator object.
|
||||
*/
|
||||
public function __call($method, $args)
|
||||
{
|
||||
return call_user_func_array(array($this->translator, $method), $args);
|
||||
return \call_user_func_array(array($this->translator, $method), $args);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user