RESOURCEBUNDLE_GET(3) 1 RESOURCEBUNDLE_GET(3)ResourceBundle::get - Get data from the bundle
Object oriented style
SYNOPSIS
public mixed ResourceBundle::get (string|int $index)
DESCRIPTION
Procedural style
mixed resourcebundle_get (ResourceBundle $r, string|int $index)
Get the data from the bundle by index or string key.
PARAMETERS
o $r
-ResourceBundle object.
o $index
- Data index, must be string or integer.
RETURN VALUES
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.
EXAMPLES
Example #1
resourcebundle_get(3) example
<?php
$r = resourcebundle_create( 'es', "/usr/share/data/myapp");
echo resourcebundle_get($r, 'somestring');
?>
Example #2
OO example
<?php
$r = new ResourceBundle( 'es', "/usr/share/data/myapp");
echo $r->get('somestring');
?>
The above example will output:
?Hola, mundo!
SEE ALSO resourcebundle_count(3).
PHP Documentation Group RESOURCEBUNDLE_GET(3)
Check Out this Related Man Page
RESOURCEBUNDLE_CREATE(3) 1 RESOURCEBUNDLE_CREATE(3)ResourceBundle::create - Create a resource bundle
Object oriented style (method)
SYNOPSIS
publicstatic ResourceBundle ResourceBundle::create (string $locale, string $bundlename, [bool $fallback])
DESCRIPTION
Procedural style
ResourceBundle resourcebundle_create (string $locale, string $bundlename, [bool $fallback])
Object oriented style (constructor): ResourceBundle::__construct (string $locale, string $bundlename, [bool $fallback])
Creates a resource bundle.
PARAMETERS
o $locale
- Locale for which the resources should be loaded (locale name, e.g. en_CA).
o $bundlename
- The directory where the data is stored or the name of the .dat file.
o $fallback
- Whether locale should match exactly or fallback to parent locale is allowed.
RETURN VALUES
Returns ResourceBundle object or NULL on error.
EXAMPLES
Example #1
resourcebundle_create(3) example
<?php
$r = resourcebundle_create( 'es', "/usr/share/data/myapp");
echo $r['teststring'];
?>
Example #2
resourcebundle_create(3) example
<?php
$r = ResourceBundle::create( 'es', "/usr/share/data/myapp");
echo $r['teststring'];
?>
The above example will output:
iHola, mundo!
SEE ALSO resourcebundle_get(3).
PHP Documentation Group RESOURCEBUNDLE_CREATE(3)
iam geting a error with this index script. heres the error
Parse error: parse error in c:\phpdev\www\dev\compulearn\in work\index.php on line 39
Whats wrong??
------------------------
<?php
//display header and left bars
include ('header.php');
include ('left.php');
//connect... (13 Replies)
Hola no escribo en ingles, pero si alguno puede ayudarme..
Quisiera saber si hay algun comando en unix que me permita hacer el mecanismo de montar el cassette a la unidad de dlt, asi como se que existe para que la expulse , quisiera saber si hay comando, que por decir la introduzca... (1 Reply)
Hi,
I need to search one file based on the entry from another;
eg.
file1 has entries;
45654
34768
12345
File2 has entries
23234 somestring 4312
45654 somestring 34768
12345 somestring 45654
so I need to pick first entry in file1 which eg. '45654' and... (8 Replies)
Hi Folks,
Under the path /home, I need to remove the index.html/php files from all the users. But the thing is I need to move the index file from the username starting with a-d, then e-g. How can I do this via the shell script. (2 Replies)