示例#1
0
 /**
  * __invoke
  *
  * @param        $message
  * @param array  $prams
  * @param string $textDomain
  * @param null   $locale
  *
  * @return string
  */
 public function __invoke($message, $prams = [], $textDomain = 'default', $locale = null)
 {
     return $this->paramTranslator->translate($message, $prams, $textDomain, $locale);
 }
 /**
  * translate
  *
  * @param string $message
  * @param array  $params
  * @param string $textDomain
  * @param null   $locale
  *
  * @return string
  */
 public function translate($message, $params = [], $textDomain = 'default', $locale = null)
 {
     $result = parent::translate($message, $params, $textDomain, $locale);
     return $this->htmlPurifier->purify($result);
 }