ResourceBundle::get() - ResourceBundle类
ResourceBundle::get()
resourcebundle_get
(PHP 5 >= 5.3.2, PHP 7, PECL intl >= 2.0.0)
Get data from the bundle
说明
面向对象风格publicResourceBundle::get(string|int$index[,bool $fallback=
TRUE
]): mixed过程化风格resourcebundle_get(ResourceBundle$r, string|int$index[,bool $fallback=
TRUE
]): mixedGet the data from the bundle by index or string key.
参数
$rResourceBundle object.
$indexData index, must be string or integer.
$fallbackWhether locale should match exactly or fallback to parent locale is allowed.
返回值
Returns the data located at the index or NULL
on error. Strings, integers and binary data strings are returned as corresponding PHP types, integer array is returned as PHP array. Complex types are returned as ResourceBundle object.
范例
resourcebundle_get() example
OO example
以上例程会输出:
?Hola, mundo!
参见
- resourcebundle_count() Get number of elements in the bundle
鹏仔微信 15129739599 鹏仔QQ344225443 鹏仔前端 pjxi.com 共享博客 sharedbk.com
图片声明:本站部分配图来自网络。本站只作为美观性配图使用,无任何非法侵犯第三方意图,一切解释权归图片著作权方,本站不承担任何责任。如有恶意碰瓷者,必当奉陪到底严惩不贷!