本文整理汇总了PHP中CMap::keys方法的典型用法代码示例。如果您正苦于以下问题:PHP CMap::keys方法的具体用法?PHP CMap::keys怎么用?PHP CMap::keys使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMap
的用法示例。
在下文中一共展示了CMap::keys方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: knownCountryCodes
/**
* 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));
}
示例2: keys
/**
* 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));
}
示例3: testKeys
public function testKeys()
{
$map = ["one" => "a", "two" => "b", "three" => "c"];
$keys = CMap::keys($map);
$this->assertTrue(CArray::equals($keys, CArray::fromElements("one", "two", "three")));
}