Ejemplo n.º 1
0
 /**
  * Merge Country
  * 
  * Merge this list with an I18Nv2_Country list to a new I18Nv2_CommonList,
  * where the international area codes map to the full country name.
  * 
  * @access  public
  * @return  object  I18Nv2_CommonList
  * @param   object  $country I18Nv2_Country
  */
 function &mergeCountry(&$country)
 {
     $list =& new I18Nv2_CommonList($country->getLanguage(), $encoding = $country->getEncoding());
     $country->setEncoding('UTF-8');
     $ctys = $country->getAllCodes();
     $acds = $this->getAllCodes();
     $country->setEncoding($encoding);
     $uniq = array_intersect(array_keys($acds), array_keys($ctys));
     foreach ($uniq as $code) {
         $list->codes[$acds[$code]] = $ctys[$code];
     }
     return $list;
 }
 /** 
  * Get current encoding
  * 
  * @access  public
  * @return  string
  */
 function getEncoding()
 {
     return $this->list->getEncoding();
 }