src/Phrase.php 1 location
|
@@ 70-75 (lines=6) @@
|
67 |
|
{ |
68 |
|
$this->message = $message; |
69 |
|
|
70 |
|
if (is_array($count)) { |
71 |
|
$locale = ($domain !== NULL) ? (string) $domain : NULL; |
72 |
|
$domain = ($parameters !== NULL) ? (string) $parameters : NULL; |
73 |
|
$parameters = $count; |
74 |
|
$count = NULL; |
75 |
|
} |
76 |
|
|
77 |
|
$this->count = $count !== NULL ? (int) $count : NULL; |
78 |
|
$this->parameters = (array) $parameters; |
src/PrefixedTranslator.php 1 location
|
@@ 85-90 (lines=6) @@
|
82 |
|
return $this->translator->translate(new Phrase($prefix . $translationString, $message->count, $message->parameters, $message->domain, $message->locale)); |
83 |
|
} |
84 |
|
|
85 |
|
if (is_array($count)) { |
86 |
|
$locale = $domain !== NULL ? (string) $domain : NULL; |
87 |
|
$domain = $parameters !== NULL && !empty($parameters) ? (string) $parameters : NULL; |
88 |
|
$parameters = $count; |
89 |
|
$count = NULL; |
90 |
|
} |
91 |
|
|
92 |
|
return $this->translator->translate($prefix . $translationString, $count, (array) $parameters, $domain, $locale); |
93 |
|
} |
src/TemplateHelpers.php 1 location
|
@@ 80-85 (lines=6) @@
|
77 |
|
*/ |
78 |
|
public function translate($message, $count = NULL, $parameters = [], $domain = NULL, $locale = NULL) |
79 |
|
{ |
80 |
|
if (is_array($count)) { |
81 |
|
$locale = ($domain !== NULL) ? (string) $domain : NULL; |
82 |
|
$domain = ($parameters !== NULL && !empty($parameters)) ? (string) $parameters : NULL; |
83 |
|
$parameters = $count; |
84 |
|
$count = NULL; |
85 |
|
} |
86 |
|
|
87 |
|
return $this->translator->translate( |
88 |
|
$message, |
src/Translator.php 1 location
|
@@ 152-157 (lines=6) @@
|
149 |
|
return $message->translate($this); |
150 |
|
} |
151 |
|
|
152 |
|
if (is_array($count)) { |
153 |
|
$locale = ($domain !== NULL) ? (string) $domain : NULL; |
154 |
|
$domain = ($parameters !== NULL && !empty($parameters)) ? (string) $parameters : NULL; |
155 |
|
$parameters = $count; |
156 |
|
$count = NULL; |
157 |
|
} |
158 |
|
|
159 |
|
if (empty($message)) { |
160 |
|
return $message; |