Changeset View
Changeset View
Standalone View
Standalone View
src/internationalization/pht.php
Show All 10 Lines | |||||
* @param ... Next values referenced from $text. | * @param ... Next values referenced from $text. | ||||
* @return string Translated string with substituted values. | * @return string Translated string with substituted values. | ||||
*/ | */ | ||||
function pht($text, $variant = null /* , ... */) { | function pht($text, $variant = null /* , ... */) { | ||||
$args = func_get_args(); | $args = func_get_args(); | ||||
$translator = PhutilTranslator::getInstance(); | $translator = PhutilTranslator::getInstance(); | ||||
return call_user_func_array(array($translator, 'translate'), $args); | return call_user_func_array(array($translator, 'translate'), $args); | ||||
} | } | ||||
/** | |||||
* Count all elements in an array, or something in an object. | |||||
* | |||||
* @param wild An array or `Countable` object. | |||||
* @return PhutilNumber Returns the number of elements in the input parameter. | |||||
*/ | |||||
function phnutil_count($countable) { | |||||
epriestley: Function spelled wrong (`phnutil` should be `phutil`). | |||||
return new PhutilNumber(count($countable)); | |||||
} |
Function spelled wrong (phnutil should be phutil).