Example #1
0
 /**
  * Gets the Collator for the desired locale.
  *
  * @param   util.Locale locale
  * @return  text.Collator
  */
 public static function getInstance(Locale $locale)
 {
     $id = $locale->hashCode();
     if (!isset(self::$instance[$id])) {
         self::$instance[$id] = new self($locale->toString());
     }
     return self::$instance[$id];
 }