@@ -92,11 +92,11 @@ class sfCultureInfo
92
92
* @var sfNumberFormatInfo
93
93
*/
94
94
protected $ numberFormat ;
95
-
95
+
96
96
/**
97
97
* A list of properties that are accessable/writable.
98
98
* @var array
99
- */
99
+ */
100
100
protected $ properties = array ();
101
101
102
102
/**
@@ -191,9 +191,9 @@ public function __set($name, $value)
191
191
}
192
192
193
193
/**
194
- * Initializes a new instance of the sfCultureInfo class based on the
194
+ * Initializes a new instance of the sfCultureInfo class based on the
195
195
* culture specified by name. E.g. <code>new sfCultureInfo('en_AU');</code>
196
- * The culture indentifier must be of the form
196
+ * The culture indentifier must be of the form
197
197
* "<language>_(country/region/variant)".
198
198
*
199
199
* @param string $culture a culture name, e.g. "en_AU".
@@ -323,7 +323,7 @@ protected function loadCultureData($culture)
323
323
* this function.
324
324
*
325
325
* @param string $filename the ICU data filename
326
- * @return array ICU data
326
+ * @return array ICU data
327
327
*/
328
328
protected function &getData ($ filename )
329
329
{
@@ -347,7 +347,7 @@ protected function &getData($filename)
347
347
* Use merge=true to return the ICU including the parent culture.
348
348
* E.g. The currency data for a variant, say "en_AU" contains one
349
349
* entry, the currency for AUD, the other currency data are stored
350
- * in the "en" data file. Thus to retrieve all the data regarding
350
+ * in the "en" data file. Thus to retrieve all the data regarding
351
351
* currency for "en_AU", you need to use findInfo("Currencies,true);.
352
352
*
353
353
* @param string $path the data you want to find.
@@ -429,9 +429,9 @@ protected function searchArray($info, $path = '/')
429
429
}
430
430
}
431
431
}
432
-
432
+
433
433
/**
434
- * Gets the culture name in the format
434
+ * Gets the culture name in the format
435
435
* "<languagecode2>_(country/regioncode2)".
436
436
*
437
437
* @return string culture name.
@@ -516,7 +516,7 @@ public function getEnglishName()
516
516
$ culture = $ this ->getInvariantCulture ();
517
517
518
518
$ language = $ culture ->findInfo ("Languages/ {$ lang }" );
519
- if (count ($ language ) == 0 )
519
+ if (is_array ( $ language ) && count ($ language ) == 0 )
520
520
{
521
521
return $ this ->culture ;
522
522
}
@@ -547,7 +547,7 @@ static function getInvariantCulture()
547
547
}
548
548
549
549
/**
550
- * Gets a value indicating whether the current sfCultureInfo
550
+ * Gets a value indicating whether the current sfCultureInfo
551
551
* represents a neutral culture. Returns true if the culture
552
552
* only contains two characters.
553
553
*
@@ -590,7 +590,7 @@ public function setNumberFormat($numberFormat)
590
590
}
591
591
592
592
/**
593
- * Gets the sfCultureInfo that represents the parent culture of the
593
+ * Gets the sfCultureInfo that represents the parent culture of the
594
594
* current sfCultureInfo
595
595
*
596
596
* @return sfCultureInfo parent culture information.
@@ -606,14 +606,14 @@ public function getParent()
606
606
}
607
607
608
608
/**
609
- * Gets the list of supported cultures filtered by the specified
609
+ * Gets the list of supported cultures filtered by the specified
610
610
* culture type. This is an EXPENSIVE function, it needs to traverse
611
611
* a list of ICU files in the data directory.
612
612
* This function can be called statically.
613
613
*
614
614
* @param int $type culture type, sfCultureInfo::ALL, sfCultureInfo::NEUTRAL
615
615
* or sfCultureInfo::SPECIFIC.
616
- * @return array list of culture information available.
616
+ * @return array list of culture information available.
617
617
*/
618
618
static function getCultures ($ type = sfCultureInfo::ALL )
619
619
{
@@ -719,7 +719,7 @@ public function getLanguage($code)
719
719
*
720
720
* @param array $countries An array of countries used to restrict the returned array (null by default, which means all countries)
721
721
*
722
- * @return array a list of localized country names.
722
+ * @return array a list of localized country names.
723
723
*/
724
724
public function getCountries ($ countries = null )
725
725
{
0 commit comments