Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F390599
smarty_method_get_global.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
793 B
Subscribers
None
smarty_method_get_global.php
View Options
<?php
/**
* Smarty method Get_Global
*
* Returns a single or all global variables
*
* @package Smarty
* @subpackage SmartyMethod
* @author Uwe Tews
*/
/**
* Returns a single or all global variables
*
* @param object $smarty
* @param string $varname variable name or null
* @return string variable value or or array of variables
*/
function
Smarty_Method_Get_Global
(
$smarty
,
$varname
=
null
)
{
if
(
isset
(
$varname
))
{
if
(
isset
(
$smarty
->
global_tpl_vars
[
$varname
]))
{
return
$smarty
->
global_tpl_vars
[
$varname
]->
value
;
}
else
{
return
''
;
}
}
else
{
$_result
=
array
();
foreach
(
$smarty
->
global_tpl_vars
AS
$key
=>
$var
)
{
$_result
[
$key
]
=
$var
->
value
;
}
return
$_result
;
}
}
?>
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Feb 22, 15:27 (7 h, 47 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25877
Default Alt Text
smarty_method_get_global.php (793 B)
Attached To
rZED Zed
Event Timeline
Log In to Comment