File: content.inc.php

package info (click to toggle)
php-xajax 0.5-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 1,176 kB
  • ctags: 2,662
  • sloc: php: 11,879; sh: 34; makefile: 13
file content (284 lines) | stat: -rw-r--r-- 5,965 bytes parent folder | download | duplicates (2)
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
<?php
/*
	File: content.inc.php

	HTML Control Library - Content Level Tags

	Title: xajax HTML control class library

	Please see <copyright.inc.php> for a detailed description, copyright
	and license information.
*/

/*
	@package xajax
	@version $Id: content.inc.php 362 2007-05-29 15:32:24Z calltoconstruct $
	@copyright Copyright (c) 2005-2007 by Jared White & J. Max Wilson
	@copyright Copyright (c) 2008-2009 by Joseph Woolley, Steffen Konerow, Jared White  & J. Max Wilson
	@license http://www.xajaxproject.org/bsd_license.txt BSD License
*/

/*
	Section: Description
	
	This file contains class declarations for the following HTML tags:
	
	- literal
	- br, hr
	- sub, sup, q, em, strong, cite, dfn, code, samp, kbd, var, abbr, acronym, tt, i, b, big, small, ins, del
	- h1 ... h6, address, p, blockquote, pre
	
	The following tags are deprecated as of HTML 4.01 and therefore they are not supported.
	
	- font, strike, s, u, center
*/

class clsLiteral extends xajaxControl
{
	function clsLiteral($sText)
	{
		xajaxControl::xajaxControl('CDATA');

		$this->sClass = '%inline';
		$this->sText = $sText;
	}

	function printHTML($sIndent='')
	{
		echo $this->sText;
	}
}

class clsBr extends xajaxControl
{
	function clsBr($aConfiguration=array())
	{
		xajaxControl::xajaxControl('br', $aConfiguration);
		
		$this->sClass = '%inline';
		$this->sEndTag = 'optional';
	}
}

class clsHr extends xajaxControl
{
	function clsHr($aConfiguration=array())
	{
		xajaxControl::xajaxControl('hr', $aConfiguration);
		
		$this->sClass = '%inline';
		$this->sEndTag = 'optional';
	}
}

class clsInlineContainer extends xajaxControlContainer
{
	function clsInlineContainer($sTag, $aConfiguration)
	{
		xajaxControlContainer::xajaxControlContainer($sTag, $aConfiguration);
		
		$this->sClass = '%inline';
		$this->sEndTag = 'required';
	}
}

class clsSub extends clsInlineContainer
{
	function clsSub($aConfiguration=array())
	{
		clsInlineContainer::clsInlineContainer('sub', $aConfiguration);
	}
}

class clsSup extends xajaxControlContainer
{
	function clsSup($aConfiguration=array())
	{
		clsInlineContainer::clsInlineContainer('sup', $aConfiguration);
	}
}

class clsEm extends clsInlineContainer
{
	function clsEm($aConfiguration=array())
	{
		clsInlineContainer::clsInlineContainer('em', $aConfiguration);
	}
}

class clsStrong extends clsInlineContainer
{
	function clsStrong($aConfiguration=array())
	{
		clsInlineContainer::clsInlineContainer('strong', $aConfiguration);
	}
}

class clsCite extends clsInlineContainer
{
	function clsCite($aConfiguration=array())
	{
		clsInlineContainer::clsInlineContainer('cite', $aConfiguration);
	}
}

class clsDfn extends clsInlineContainer
{
	function clsDfn($aConfiguration=array())
	{
		clsInlineContainer::clsInlineContainer('dfn', $aConfiguration);
	}
}

class clsCode extends clsInlineContainer
{
	function clsCode($aConfiguration=array())
	{
		clsInlineContainer::clsInlineContainer('code', $aConfiguration);
	}
}

class clsSamp extends clsInlineContainer
{
	function clsSamp($aConfiguration=array())
	{
		clsInlineContainer::clsInlineContainer('samp', $aConfiguration);
	}
}

class clsKbd extends clsInlineContainer
{
	function clsKbd($aConfiguration=array())
	{
		clsInlineContainer::clsInlineContainer('kbd', $aConfiguration);
	}
}

class clsVar extends clsInlineContainer
{
	function clsVar($aConfiguration=array())
	{
		clsInlineContainer::clsInlineContainer('var', $aConfiguration);
	}
}

class clsAbbr extends clsInlineContainer
{
	function clsAbbr($aConfiguration=array())
	{
		clsInlineContainer::clsInlineContainer('abbr', $aConfiguration);
	}
}

class clsAcronym extends clsInlineContainer
{
	function clsAcronym($aConfiguration=array())
	{
		clsInlineContainer::clsInlineContainer('acronym', $aConfiguration);
	}
}

class clsTt extends clsInlineContainer
{
	function clsTt($aConfiguration=array())
	{
		clsInlineContainer::clsInlineContainer('tt', $aConfiguration);
	}
}

class clsItalic extends clsInlineContainer
{
	function clsItalic($aConfiguration=array())
	{
		clsInlineContainer::clsInlineContainer('i', $aConfiguration);
	}
}

class clsBold extends clsInlineContainer
{
	function clsBold($aConfiguration=array())
	{
		clsInlineContainer::clsInlineContainer('b', $aConfiguration);
	}
}

class clsBig extends clsInlineContainer
{
	function clsBig($aConfiguration=array())
	{
		clsInlineContainer::clsInlineContainer('big', $aConfiguration);
	}
}


class clsSmall extends clsInlineContainer
{
	function clsSmall($aConfiguration=array())
	{
		clsInlineContainer::clsInlineContainer('small', $aConfiguration);
	}
}

class clsIns extends clsInlineContainer
{
	function clsIns($aConfiguration=array())
	{
		clsInlineContainer::clsInlineContainer('ins', $aConfiguration);
	}
}

class clsDel extends clsInlineContainer
{
	function clsDel($aConfiguration=array())
	{
		clsInlineContainer::clsInlineContainer('del', $aConfiguration);
	}
}

class clsHeadline extends xajaxControlContainer
{
	function clsHeadline($sType, $aConfiguration=array())
	{
		if (0 < strpos($sType, '123456'))
			trigger_error('Invalid type for headline control; should be 1,2,3,4,5 or 6.'
				. $this->backtrace(),
				E_USER_ERROR
				);
		
		xajaxControlContainer::xajaxControlContainer('h' . $sType, $aConfiguration);

		$this->sClass = '%inline';
	}
}

class clsAddress extends clsInlineContainer
{
	function clsAddress($aConfiguration=array())
	{
		clsInlineContainer::clsInlineContainer('address', $aConfiguration);
	}
}

class clsParagraph extends clsInlineContainer
{
	function clsParagraph($aConfiguration=array())
	{
		clsInlineContainer::clsInlineContainer('p', $aConfiguration);
	}
}

class clsBlockquote extends clsInlineContainer
{
	function clsBlockquote($aConfiguration=array())
	{
		clsInlineContainer::clsInlineContainer('blockquote', $aConfiguration);
	}
}

class clsPre extends clsInlineContainer
{
	function clsPre($aConfiguration=array())
	{
		clsInlineContainer::clsInlineContainer('pre', $aConfiguration);
	}
}