Exemple #1
0
 /**
  * Returns the known country/region codes as an array.
  *
  * @return CArrayObject The known country/region codes of type `CUStringObject`.
  */
 public static function knownCountryCodes()
 {
     return oop_a(CMap::keys(DULocale::$CountryCodeToInfo));
 }
Exemple #2
0
 /**
  * Extracts and returns the keys from a map, as an array.
  *
  * @return CArrayObject The map's keys.
  */
 public function keys()
 {
     return CArrayObject::fromSplArray(CMap::keys($this->m_map));
 }
Exemple #3
0
 public function testKeys()
 {
     $map = ["one" => "a", "two" => "b", "three" => "c"];
     $keys = CMap::keys($map);
     $this->assertTrue(CArray::equals($keys, CArray::fromElements("one", "two", "three")));
 }