Neomerx\JsonApi\I18n\Translator::t PHP Метод

t() публичный статический Метод

public static t ( string $format, array $parameters = [] ) : string
$format string
$parameters array
Результат string
    public static function t($format, array $parameters = [])
    {
        return static::getTranslator()->translate($format, $parameters);
    }

Usage Example

Пример #1
0
 /**
  * Constructor.
  *
  * @param ErrorInterface|ErrorInterface[]|ErrorCollection $errors
  * @param int                                             $httpCode
  * @param Exception|null                                  $previous
  */
 public function __construct($errors, $httpCode = self::DEFAULT_HTTP_CODE, Exception $previous = null)
 {
     parent::__construct(T::t('JSON API error'), 0, $previous);
     $this->errors = new ErrorCollection();
     if ($errors instanceof ErrorCollection) {
         $this->addErrors($errors);
     } elseif (is_array($errors) === true) {
         $this->addErrorsFromArray($errors);
     } else {
         // should be ErrorInterface
         $this->addError($errors);
     }
     $this->httpCode = $httpCode;
 }
All Usage Examples Of Neomerx\JsonApi\I18n\Translator::t