]> git.mxchange.org Git - friendica.git/blob - vendor/smarty/smarty/libs/sysplugins/smarty_internal_method_unregisterplugin.php
Add Smarty to Composer
[friendica.git] / vendor / smarty / smarty / libs / sysplugins / smarty_internal_method_unregisterplugin.php
1 <?php
2
3 /**
4  * Smarty Method UnregisterPlugin
5  *
6  * Smarty::unregisterPlugin() method
7  *
8  * @package    Smarty
9  * @subpackage PluginsInternal
10  * @author     Uwe Tews
11  */
12 class Smarty_Internal_Method_UnregisterPlugin
13 {
14     /**
15      * Valid for Smarty and template object
16      *
17      * @var int
18      */
19     public $objMap = 3;
20
21     /**
22      * Registers plugin to be used in templates
23      *
24      * @api  Smarty::unregisterPlugin()
25      * @link http://www.smarty.net/docs/en/api.unregister.plugin.tpl
26      *
27      * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj
28      * @param  string                                                         $type plugin type
29      * @param  string                                                         $name name of template tag
30      *
31      * @return \Smarty|\Smarty_Internal_Template
32      */
33     public function unregisterPlugin(Smarty_Internal_TemplateBase $obj, $type, $name)
34     {
35         $smarty = $obj->_getSmartyObj();
36         if (isset($smarty->registered_plugins[ $type ][ $name ])) {
37             unset($smarty->registered_plugins[ $type ][ $name ]);
38         }
39         return $obj;
40     }
41 }