mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
Add register/unregister API for output filters.
This commit is contained in:
@@ -380,10 +380,7 @@ class Smarty
|
|||||||
\*======================================================================*/
|
\*======================================================================*/
|
||||||
function unregister_prefilter($function)
|
function unregister_prefilter($function)
|
||||||
{
|
{
|
||||||
if (isset($this->_plugins['prefilter'][$function]))
|
unset($this->_plugins['prefilter'][$function]);
|
||||||
unset($this->_plugins['prefilter'][$function]);
|
|
||||||
else
|
|
||||||
$this->_plugins['prefilter'][$function] = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*======================================================================*\
|
/*======================================================================*\
|
||||||
@@ -403,10 +400,27 @@ class Smarty
|
|||||||
\*======================================================================*/
|
\*======================================================================*/
|
||||||
function unregister_postfilter($function)
|
function unregister_postfilter($function)
|
||||||
{
|
{
|
||||||
if (isset($this->_plugins['postfilter'][$function]))
|
unset($this->_plugins['postfilter'][$function]);
|
||||||
unset($this->_plugins['postfilter'][$function]);
|
}
|
||||||
else
|
|
||||||
$this->_plugins['postfilter'][$function] = false;
|
/*======================================================================*\
|
||||||
|
Function: register_outputfilter
|
||||||
|
Purpose: Registers an output filter function to apply
|
||||||
|
to a template output
|
||||||
|
\*======================================================================*/
|
||||||
|
function register_outputfilter($function)
|
||||||
|
{
|
||||||
|
$this->_plugins['postfilter'][$function]
|
||||||
|
= array($function, null, null, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*======================================================================*\
|
||||||
|
Function: unregister_outputfilter
|
||||||
|
Purpose: Unregisters an outputfilter function
|
||||||
|
\*======================================================================*/
|
||||||
|
function unregister_outputfilter($function)
|
||||||
|
{
|
||||||
|
unset($this->_plugins['outputfilter'][$function]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*======================================================================*\
|
/*======================================================================*\
|
||||||
|
@@ -380,10 +380,7 @@ class Smarty
|
|||||||
\*======================================================================*/
|
\*======================================================================*/
|
||||||
function unregister_prefilter($function)
|
function unregister_prefilter($function)
|
||||||
{
|
{
|
||||||
if (isset($this->_plugins['prefilter'][$function]))
|
unset($this->_plugins['prefilter'][$function]);
|
||||||
unset($this->_plugins['prefilter'][$function]);
|
|
||||||
else
|
|
||||||
$this->_plugins['prefilter'][$function] = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*======================================================================*\
|
/*======================================================================*\
|
||||||
@@ -403,10 +400,27 @@ class Smarty
|
|||||||
\*======================================================================*/
|
\*======================================================================*/
|
||||||
function unregister_postfilter($function)
|
function unregister_postfilter($function)
|
||||||
{
|
{
|
||||||
if (isset($this->_plugins['postfilter'][$function]))
|
unset($this->_plugins['postfilter'][$function]);
|
||||||
unset($this->_plugins['postfilter'][$function]);
|
}
|
||||||
else
|
|
||||||
$this->_plugins['postfilter'][$function] = false;
|
/*======================================================================*\
|
||||||
|
Function: register_outputfilter
|
||||||
|
Purpose: Registers an output filter function to apply
|
||||||
|
to a template output
|
||||||
|
\*======================================================================*/
|
||||||
|
function register_outputfilter($function)
|
||||||
|
{
|
||||||
|
$this->_plugins['postfilter'][$function]
|
||||||
|
= array($function, null, null, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*======================================================================*\
|
||||||
|
Function: unregister_outputfilter
|
||||||
|
Purpose: Unregisters an outputfilter function
|
||||||
|
\*======================================================================*/
|
||||||
|
function unregister_outputfilter($function)
|
||||||
|
{
|
||||||
|
unset($this->_plugins['outputfilter'][$function]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*======================================================================*\
|
/*======================================================================*\
|
||||||
|
Reference in New Issue
Block a user