Beispiel #1
0
 public function _translateFormulaToEnglish($formula)
 {
     if (is_null(self::$functionReplaceFromLocale)) {
         self::$functionReplaceFromLocale = array();
         foreach (array_values(self::$_localeFunctions) as $localeFunctionName) {
             self::$functionReplaceFromLocale[] = '/(@?[^\\w\\.])' . preg_quote($localeFunctionName) . '([\\s]*\\()/Ui';
         }
         foreach (array_values(self::$_localeBoolean) as $excelBoolean) {
             self::$functionReplaceFromLocale[] = '/(@?[^\\w\\.])' . preg_quote($excelBoolean) . '([^\\w\\.])/Ui';
         }
     }
     if (is_null(self::$functionReplaceToExcel)) {
         self::$functionReplaceToExcel = array();
         foreach (array_keys(self::$_localeFunctions) as $excelFunctionName) {
             self::$functionReplaceToExcel[] = '$1' . trim($excelFunctionName) . '$2';
         }
         foreach (array_keys(self::$_localeBoolean) as $excelBoolean) {
             self::$functionReplaceToExcel[] = '$1' . trim($excelBoolean) . '$2';
         }
     }
     return self::_translateFormula(self::$functionReplaceFromLocale, self::$functionReplaceToExcel, $formula, self::$_localeArgumentSeparator, ',');
 }