Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F391779
smarty_method_load_filter.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
768 B
Subscribers
None
smarty_method_load_filter.php
View Options
<?php
/**
* Smarty method Load_Filter
*
* Loads a filter plugin
*
* @package Smarty
* @subpackage SmartyMethod
* @author Uwe Tews
*/
/**
* load a filter of specified type and name
*
* @param string $type filter type
* @param string $name filter name
*/
function
Smarty_Method_Load_Filter
(
$smarty
,
$type
,
$name
)
{
$_plugin
=
"smarty_{$type}filter_{$name}"
;
$_filter_name
=
$_plugin
;
if
(
$smarty
->
loadPlugin
(
$_plugin
))
{
if
(
class_exists
(
$_plugin
,
false
))
{
$_plugin
=
array
(
$_plugin
,
'execute'
);
}
if
(
is_callable
(
$_plugin
))
{
$smarty
->
registered_filters
[
$type
][
$_filter_name
]
=
$_plugin
;
return
;
}
}
throw
new
Exception
(
"{$type}filter
\"
{$name}
\"
not callable"
);
}
?>
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Feb 22, 20:24 (1 d, 14 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25839
Default Alt Text
smarty_method_load_filter.php (768 B)
Attached To
rZED Zed
Event Timeline
Log In to Comment