1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
<?php
/**
* Project: Smarty: the PHP compiling template engine
* File: smarty_internal_unregister.php
* SVN: $Id: $
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For questions, help, comments, discussion, etc., please join the
* Smarty mailing list. Send a blank e-mail to
* smarty-discussion-subscribe@googlegroups.com
*
* @link http://www.smarty.net/
* @copyright 2008 New Digital Group, Inc.
* @author Monte Ohrt <monte at ohrt dot com>
* @author Uwe Tews
* @package Smarty
* @subpackage PluginsInternal
* @version 3-SVN$Rev: 3286 $
*/
class Smarty_Internal_Unregister {
protected $smarty;
function __construct($smarty) {
$this->smarty = $smarty;
}
/**
* Unregisters block function
*
* @param string $block_tag name of template function
*/
function block($block_tag)
{
if (isset($this->smarty->registered_plugins['block'][$block_tag])) {
unset($this->smarty->registered_plugins['block'][$block_tag]);
}
}
/**
* Unregisters compiler function
*
* @param string $compiler_tag name of template function
*/
function compilerFunction($compiler_tag)
{
if (isset($this->smarty->registered_plugins['compiler'][$compiler_tag])) {
unset($this->smarty->registered_plugins['compiler'][$compiler_tag]);
}
}
/**
* Unregisters custom function
*
* @param string $function_tag name of template function
*/
function templateFunction($function_tag)
{
if (isset($this->smarty->registered_plugins['function'][$function_tag])) {
unset($this->smarty->registered_plugins['function'][$function_tag]);
}
}
/**
* Unregisters modifier
*
* @param string $modifier name of template modifier
*/
function modifier($modifier)
{
if (isset($this->smarty->registered_plugins['modifier'][$modifier])) {
unset($this->smarty->registered_plugins['modifier'][$modifier]);
}
}
/**
* Unregisters template object
*
* @param string $object_name name of template object
*/
function templateObject($object_name)
{
unset($this->smarty->registered_objects[$object_name]);
}
/**
* Unregisters template class
*
* @param string $object_name name of template object
*/
function templateClass($class_name)
{
unset($this->smarty->registered_classes[$class_name]);
}
/**
* Unregisters an output filter
*
* @param callback $function_name
*/
function outputFilter($function_name)
{
unset($this->smarty->registered_filters['output'][$this->smarty->_get_filter_name($function_name)]);
}
/**
* Unregisters a postfilter function
*
* @param callback $function_name
*/
function postFilter($function_name)
{
unset($this->smarty->registered_filters['post'][$this->smarty->_get_filter_name($function_name)]);
}
/**
* Unregisters a prefilter function
*
* @param callback $function_name
*/
function preFilter($function_name)
{
unset($this->smarty->registered_filters['pre'][$this->smarty->_get_filter_name($function_name)]);
}
/**
* Unregisters a resource
*
* @param string $resource_name name of resource
*/
function resource($resource_name)
{
unset($this->smarty->plugins['resource'][$resource_name]);
}
/**
* Unregisters a variablefilter function
*
* @param callback $function_name
*/
function variableFilter($function_name)
{
unset($this->smarty->registered_filters['variable'][$this->smarty->_get_filter_name($function_name)]);
}
}
?>
|