NASER add task functions
This commit is contained in:
@@ -358,18 +358,18 @@ class AdminController extends Controller
|
||||
|
||||
}
|
||||
|
||||
private function fa2en_numbers($input)
|
||||
{
|
||||
if (is_string($input)) {
|
||||
$fa_numbers = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹'];
|
||||
$en_numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
|
||||
return str_replace($fa_numbers, $en_numbers, $input);
|
||||
} elseif (is_array($input)) {
|
||||
return array_map([$this, __FUNCTION__], $input);
|
||||
} else {
|
||||
return $input;
|
||||
}
|
||||
}
|
||||
// private function fa2en_numbers($input)
|
||||
// {
|
||||
// if (is_string($input)) {
|
||||
// $fa_numbers = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹'];
|
||||
// $en_numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
|
||||
// return str_replace($fa_numbers, $en_numbers, $input);
|
||||
// } elseif (is_array($input)) {
|
||||
// return array_map([$this, __FUNCTION__], $input);
|
||||
// } else {
|
||||
// return $input;
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user