本文整理匯總了PHP中CRequest::ms_browsCap方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRequest::ms_browsCap方法的具體用法?PHP CRequest::ms_browsCap怎麽用?PHP CRequest::ms_browsCap使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CRequest
的用法示例。
在下文中一共展示了CRequest::ms_browsCap方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: userAgentProperty
/**
* Returns the value of a property of the user's agent, according to the BrowsCap project.
*
* The names of the properties and their meanings are defined by the
* [Browser Capabilities Project](http://browscap.org/).
*
* @param string $propertyName The name of the BrowsCap property.
*
* @return CUStringObject The value of the BrowsCap property.
*/
public static function userAgentProperty($propertyName)
{
assert('is_cstring($propertyName)', vs(isset($this), get_defined_vars()));
if (!isset(self::$ms_browsCap)) {
self::$ms_browsCap = get_browser(null, true);
}
return (string) self::$ms_browsCap[$propertyName];
}