/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/tag_classes/ALLTAGS.inc
ViewVC logotype

Annotation of /nfo/php/libs/com.newsblob.phphtmllib/tag_classes/ALLTAGS.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations)
Sat Feb 22 21:07:58 2003 UTC (21 years, 6 months ago) by jonen
Branch: MAIN
Changes since 1.1: +188 -56 lines
+ updated whole lib to version 2.2.1 (new FormProcessing since 2.2.0!)

1 jonen 1.1 <?php
2    
3     /**
4     * This file contains all of the default
5     * support html tags by phpHtmlLib.
6     *
7 jonen 1.2 * $Id: ALLTAGS.inc,v 1.26 2003/02/18 23:02:01 hemna Exp $
8 jonen 1.1 *
9     * @author Walter A. Boring IV <waboring@buildabetterweb.com>
10     * @package phpHtmlLib
11     *
12     */
13    
14    
15     /**
16     * <A> tag class
17 jonen 1.2 * @package phpHtmlLib
18 jonen 1.1 */
19     class Atag extends HTMLTagClass {
20     var $_tag = "a";
21     var $_debug_link_attributes = array("href");
22     var $_htmlentities_attributes = array("href");
23 jonen 1.2
24     function _set_flags() {
25     parent::_set_flags();
26     $this->_flags &= ~_NEWLINEAFTEROPENTAG;
27     }
28 jonen 1.1 } // Atag
29    
30    
31     /**
32     * <ABBR> tag class
33 jonen 1.2 * @package phpHtmlLib
34 jonen 1.1 */
35     class ABBRtag extends HTMLTagClass {
36     var $_tag = "abbr";
37     } // ABBRtag
38    
39    
40     /**
41     * <ACRONYM> tag class
42 jonen 1.2 * @package phpHtmlLib
43 jonen 1.1 */
44     class ACRONYMtag extends HTMLTagClass {
45     var $_tag = "acronym";
46     } // ACRONYMtag
47    
48    
49     /**
50     * <ADDRESS> tag class
51 jonen 1.2 * @package phpHtmlLib
52 jonen 1.1 */
53     class ADDRESStag extends HTMLTagClass {
54     var $_tag = "address";
55     } // ADDRESStag
56    
57     /**
58     * <APPLET> tag class
59 jonen 1.2 * @package phpHtmlLib
60 jonen 1.1 *
61     * @deprecated
62     */
63     class APPLETtag extends HTMLTagClass {
64     var $_tag = "applet";
65 jonen 1.2 function _set_flags() {
66     parent::_set_flags();
67     $this->_flags |= _DEPRICATED;
68     }
69 jonen 1.1 } // APPLETtag
70    
71     /**
72     * <AREA> tag class
73 jonen 1.2 * @package phpHtmlLib
74 jonen 1.1 */
75     class AREAtag extends HTMLTagClass {
76     var $_tag = "area";
77 jonen 1.2 function _set_flags() {
78     parent::_set_flags();
79     $this->_flags &= ~(_CONTENTREQUIRED | _CLOSETAGREQUIRED);
80     }
81 jonen 1.1 } // AREAtag
82    
83    
84     /**
85     * <B> tag class
86 jonen 1.2 * @package phpHtmlLib
87 jonen 1.1 */
88     class Btag extends HTMLTagClass {
89     var $_tag = "b";
90 jonen 1.2 function _set_flags() {
91     parent::_set_flags();
92     $this->_flags &= ~_NEWLINEAFTEROPENTAG;
93     }
94 jonen 1.1 } // Btag
95    
96    
97     /**
98     * <BASE> tag class
99 jonen 1.2 * @package phpHtmlLib
100 jonen 1.1 */
101     class BASEtag extends HTMLTagClass {
102     var $_tag = "base";
103 jonen 1.2 function _set_flags() {
104     parent::_set_flags();
105     $this->_flags &= ~(_CONTENTREQUIRED | _CLOSETAGREQUIRED);
106     }
107 jonen 1.1 } // BASEtag
108    
109    
110     /**
111     * <BDO> tag class
112     *
113     * The bdo element overrides the default
114     * text direction.
115     *
116     * REQUIRED ATTRIBUTE
117     * dir : url
118 jonen 1.2 * @package phpHtmlLib
119 jonen 1.1 *
120     */
121     class BDOtag extends HTMLTagClass {
122     var $_tag = "bdo";
123     } // BDOtag
124    
125    
126     /**
127     * <BIG> tag class
128     *
129 jonen 1.2 * renders as 'bigger' text.
130     * @package phpHtmlLib
131 jonen 1.1 */
132     class BIGtag extends HTMLTagClass {
133     var $_tag = "big";
134     } // BIGtag
135    
136     /**
137     * <BLOCKQUOTE> tag class
138     *
139     * This tag defines a long
140     * quotation block
141     *
142 jonen 1.2 * @package phpHtmlLib
143 jonen 1.1 */
144     class BLOCKQUOTEtag extends HTMLTagClass {
145     var $_tag = "blockquote";
146     } // BLOCKQUOTEtag
147    
148     /**
149     * <BODY> tag class
150     *
151     * Defines the documents' body.
152     *
153     * OPTIONAL ATTRIBUTES (all depricated)
154     * alink => color : DEPRICATED
155     * background => filename : DEPRICATED
156     * bgcolor => color : DEPRICATED
157     * link => color : DEPRICATED
158     * text => color : DEPRICATED
159     * vlink => color : DEPRICATED
160     *
161 jonen 1.2 * @package phpHtmlLib
162 jonen 1.1 */
163     class BODYtag extends HTMLTagClass {
164     var $_tag = "body";
165     } // BODYtag
166    
167    
168     /**
169     * <BR> tag class
170     *
171     * This tag inserts a single line break;
172     *
173 jonen 1.2 * @package phpHtmlLib
174 jonen 1.1 */
175     class BRtag extends HTMLTagClass {
176     var $_tag = "br";
177 jonen 1.2 function _set_flags() {
178     parent::_set_flags();
179     $this->_flags &= ~(_CONTENTREQUIRED | _CLOSETAGREQUIRED);
180     }
181 jonen 1.1 } // BRtag
182    
183    
184     /**
185     * <BUTTON> tag class
186     *
187     * Defines a push button.
188     *
189 jonen 1.2 * @package phpHtmlLib
190 jonen 1.1 */
191     class BUTTONtag extends HTMLTagClass {
192     var $_tag = "button";
193     } // BUTTONtag
194    
195    
196     /**
197     * <CAPTION> tag class
198     * This element defines a table caption.
199     * The <caption> tag must be inserted immediately
200     * after the <table> tag. You can specify only one
201     * caption per table.
202     *
203     * OPTIONAL ATTRIBUTES
204     * align - top, bottom DEPRICATED
205     *
206 jonen 1.2 * @package phpHtmlLib
207 jonen 1.1 */
208     class CAPTIONtag extends HTMLTagClass {
209     var $_tag = "caption";
210     } // CAPTIONtag
211    
212    
213     /**
214     * <CENTER> tag class.
215     * this is a depricated html tag, but
216     * browsers still support it
217     *
218     * @deprecated
219 jonen 1.2 * @package phpHtmlLib
220 jonen 1.1 */
221     class CENTERtag extends HTMLTagClass {
222     var $_tag = "center";
223 jonen 1.2 function _set_flags() {
224     parent::_set_flags();
225     $this->_flags |= _DEPRICATED;
226     }
227 jonen 1.1 } // CENTERtag
228    
229    
230     /**
231     * <CITE> tag class
232     *
233     * Defines a citation
234     *
235 jonen 1.2 * @package phpHtmlLib
236 jonen 1.1 */
237     class CITEtag extends HTMLTagClass {
238     var $_tag = "cite";
239     } // CITEtag
240    
241    
242     /**
243     * <CODE> tag class
244     *
245     * Defines computer code text.
246     *
247 jonen 1.2 * @package phpHtmlLib
248 jonen 1.1 */
249     class CODEtag extends HTMLTagClass {
250     var $_tag = "code";
251     } // CODEtag
252    
253    
254     /**
255     * <COL> tag class
256     *
257     * Defines the attribute values for
258     * one or more columns in a table. You
259     * can only use this element inside a
260     * colgroup.
261     *
262 jonen 1.2 * @package phpHtmlLib
263 jonen 1.1 */
264     class COLtag extends HTMLTagClass {
265     var $_tag = "col";
266     } // COLtag
267    
268    
269     /**
270     * <COLGROUP> tag class
271     *
272     * Defines groups of table columns.
273     * This element is only valid
274     * inside the <table> tag.
275     *
276     * NOTE: The colgroup element is an empty
277     * element that contains attributes
278     * only. To create columns, you must
279     * specify td elements within a tr
280     * element.
281     *
282 jonen 1.2 * @package phpHtmlLib
283 jonen 1.1 */
284     class COLGROUPtag extends HTMLTagClass {
285     var $_tag = "colgroup";
286     } // COLGROUPtag
287    
288    
289    
290     /**
291     * <DD> tag class
292     *
293     * The <dd> tag defines the description
294     * of the term in a definition list.
295     *
296 jonen 1.2 * @package phpHtmlLib
297 jonen 1.1 */
298     class DDtag extends HTMLTagClass {
299     var $_tag = "dd";
300     } // DDtag
301    
302    
303     /**
304     * <DEL> tag class
305     *
306     * Defines text that has been deleted in
307     * a document.
308     *
309 jonen 1.2 * @package phpHtmlLib
310 jonen 1.1 */
311     class DELtag extends HTMLTagClass {
312     var $_tag = "del";
313     } // DELtag
314    
315     /**
316     * <DFN> tag class
317     *
318     * Defines a definition term
319     *
320 jonen 1.2 * @package phpHtmlLib
321 jonen 1.1 */
322     class DFNtag extends HTMLTagClass {
323     var $_tag = "dfn";
324     } // DFNtag
325    
326    
327     /**
328     * <DIV> tag class
329     *
330     * The <div> tag defines the start of a
331     * division/section in a document.
332     *
333     * NOTE: Browsers usually place a line break
334     * before the <div> tag.
335     *
336 jonen 1.2 * @package phpHtmlLib
337 jonen 1.1 */
338     class DIVtag extends HTMLTagClass {
339     var $_tag = "div";
340     } // DIVtag
341    
342    
343     /**
344     * <DL> tag class
345     *
346     * The <dl> tag defines the start of a
347     * definition list.
348     *
349 jonen 1.2 * @package phpHtmlLib
350 jonen 1.1 */
351     class DLtag extends HTMLTagClass {
352     var $_tag = "dl";
353     } // DLtag
354    
355     /**
356     * <DT> tag class
357     *
358     * The <dt> tag defines the start of a
359     * definition list.
360     *
361 jonen 1.2 * @package phpHtmlLib
362 jonen 1.1 */
363     class DTtag extends HTMLTagClass {
364     var $_tag = "dt";
365     } // DLtag
366    
367    
368     /**
369     * <EM> tag class
370     *
371     * Renders as emphasized text
372     *
373 jonen 1.2 * @package phpHtmlLib
374 jonen 1.1 */
375     class EMtag extends HTMLTagClass {
376     var $_tag = "em";
377     } // EMtag
378    
379    
380     /**
381     * <FIELDSET> tag class
382     *
383     * The fieldset element draws a box
384     * around the text and other elements
385     * it contains.
386     *
387 jonen 1.2 * @package phpHtmlLib
388 jonen 1.1 */
389     class FIELDSETtag extends HTMLTagClass {
390     var $_tag = "fieldset";
391     } // FIELDSETtag
392    
393    
394    
395     /**
396     * <FONT> tag class
397     *
398     * @deprecated use styles instead
399     *
400 jonen 1.2 * @package phpHtmlLib
401 jonen 1.1 */
402     class FONTtag extends HTMLTagClass {
403     var $_tag = "font";
404 jonen 1.2 function _set_flags() {
405     parent::_set_flags();
406     $this->_flags |= _DEPRICATED;
407     }
408 jonen 1.1 } // FONTtag
409    
410    
411    
412     /**
413     * FORMtag <FORM> tag
414     *
415     * The form element creates a form
416     * for user input.
417     *
418     * REQUIRED ATTRIBUTES
419     * action : url
420     * Specifies where to send the
421     * data when the user pushes the
422     * submit button in a form.
423     *
424 jonen 1.2 * @package phpHtmlLib
425 jonen 1.1 */
426     class FORMtag extends HTMLTagClass {
427     var $_tag = "form";
428     } // FORMtag
429    
430    
431    
432     /**
433     * <FRAME> tag class
434     *
435     * Defines a sub window (a frame).
436     *
437 jonen 1.2 * @package phpHtmlLib
438 jonen 1.1 */
439     class FRAMEtag extends HTMLTagClass {
440     var $_tag = "frame";
441 jonen 1.2 function _set_flags() {
442     parent::_set_flags();
443     $this->_flags &= ~(_CONTENTREQUIRED | _CLOSETAGREQUIRED);
444     }
445 jonen 1.1 } // FRAMEtag
446    
447     /**
448     * <FRAMESET> tag class
449     *
450     * The frameset element defines a
451     * frameset.
452     *
453 jonen 1.2 * @package phpHtmlLib
454 jonen 1.1 */
455     class FRAMESETtag extends HTMLTagClass {
456     var $_tag = "frameset";
457     } // FRAMESETtag
458    
459    
460     /**
461     * <H1> tag class
462     *
463     * Defines a header
464     *
465 jonen 1.2 * @package phpHtmlLib
466 jonen 1.1 */
467     class H1tag extends HTMLTagClass {
468     var $_tag = "h1";
469 jonen 1.2 function _set_flags() {
470     parent::_set_flags();
471     $this->_flags &= ~_NEWLINEAFTEROPENTAG;
472     }
473 jonen 1.1 } // H1tag
474    
475    
476     /**
477     * <H2> tag class
478     *
479     * Defines a header
480     *
481 jonen 1.2 * @package phpHtmlLib
482 jonen 1.1 */
483     class H2tag extends HTMLTagClass {
484     var $_tag = "h2";
485 jonen 1.2 function _set_flags() {
486     parent::_set_flags();
487     $this->_flags &= ~_NEWLINEAFTEROPENTAG;
488     }
489 jonen 1.1 } // H2tag
490    
491    
492     /**
493     * <H3> tag class
494     *
495     * Defines a header
496     *
497 jonen 1.2 * @package phpHtmlLib
498 jonen 1.1 */
499     class H3tag extends HTMLTagClass {
500     var $_tag = "h3";
501 jonen 1.2 function _set_flags() {
502     parent::_set_flags();
503     $this->_flags &= ~_NEWLINEAFTEROPENTAG;
504     }
505 jonen 1.1 } // H3tag
506    
507    
508     /**
509     * <H4> tag class
510     *
511     * Defines a header
512     *
513 jonen 1.2 * @package phpHtmlLib
514 jonen 1.1 */
515     class H4tag extends HTMLTagClass {
516     var $_tag = "h4";
517 jonen 1.2 function _set_flags() {
518     parent::_set_flags();
519     $this->_flags &= ~_NEWLINEAFTEROPENTAG;
520     }
521 jonen 1.1 } // H4tag
522    
523    
524     /**
525     * <H5> tag class
526     *
527     * Defines a header
528     *
529 jonen 1.2 * @package phpHtmlLib
530 jonen 1.1 */
531     class H5tag extends HTMLTagClass {
532     var $_tag = "h5";
533 jonen 1.2 function _set_flags() {
534     parent::_set_flags();
535     $this->_flags &= ~_NEWLINEAFTEROPENTAG;
536     }
537 jonen 1.1 } // H5tag
538    
539    
540     /**
541     * <H6> tag class
542     *
543     * Defines a header
544     *
545 jonen 1.2 * @package phpHtmlLib
546 jonen 1.1 */
547     class H6tag extends HTMLTagClass {
548     var $_tag = "h6";
549 jonen 1.2 function _set_flags() {
550     parent::_set_flags();
551     $this->_flags &= ~_NEWLINEAFTEROPENTAG;
552     }
553 jonen 1.1 } //H6tag
554    
555    
556     /**
557     * <HEAD> tag class
558     *
559     * The head element can contain information
560     * about the document.
561     *
562 jonen 1.2 * @package phpHtmlLib
563 jonen 1.1 */
564     class HEADtag extends HTMLTagClass {
565     var $_tag = "head";
566     } // HEADtag
567    
568    
569    
570     /**
571     * <HR> tag class
572     *
573     * inserts a horizontal rule.
574     *
575     * NOTE: All the "presentation attributes"
576     * of the hr element have been
577     * deprecated, in favor of style sheets.
578     *
579 jonen 1.2 * @package phpHtmlLib
580 jonen 1.1 */
581     class HRtag extends HTMLTagClass {
582     var $_tag = "hr";
583 jonen 1.2 function _set_flags() {
584     parent::_set_flags();
585     $this->_flags &= ~_NEWLINEAFTEROPENTAG;
586     }
587 jonen 1.1 } // HRtag
588    
589    
590    
591     /**
592     * <HTML> tag class.
593     *
594 jonen 1.2 * @package phpHtmlLib
595 jonen 1.1 */
596     class HTMLtag extends HTMLTagClass {
597     var $_tag = "html";
598     } // HTMLtag
599    
600    
601     /**
602     * <I> tag class
603     *
604     * Renders as italic text
605     *
606 jonen 1.2 * @package phpHtmlLib
607 jonen 1.1 */
608     class Itag extends HTMLTagClass {
609     var $_tag = "i";
610     } // Itag
611    
612    
613     /**
614     * <IFRAME> tag class
615     *
616     * The iframe element creates an inline
617     * frame that contains another document.
618     *
619 jonen 1.2 * @package phpHtmlLib
620 jonen 1.1 */
621     class IFRAMEtag extends HTMLTagClass {
622     var $_tag = "iframe";
623     } // IFRAMEtag
624    
625    
626     /**
627     * <IMG> tag class
628     *
629     * This element inserts an image.
630     *
631     * REQUIRED ATTRIBUTES
632     * src : url
633     * The address of the image you want
634     * to insert
635     * alt : text
636     * A short description of the image.
637     * Use it for text-only browsers
638     *
639 jonen 1.2 * @package phpHtmlLib
640 jonen 1.1 */
641     class IMGtag extends HTMLTagClass {
642     var $_tag = "img";
643     var $_debug_link_attributes = array("src");
644     var $_xhtml_strict_attributes = array("border");
645     var $_htmlentities_attributes = array("src");
646 jonen 1.2 function _set_flags() {
647     parent::_set_flags();
648     $this->_flags &= ~(_CONTENTREQUIRED | _CLOSETAGREQUIRED);
649     }
650 jonen 1.1
651     } // IMGtag
652    
653     /**
654     * INPUTtag <INPUT> tag
655     *
656     * The <input> tag defines the start of an input
657     * field where the user can enter data.
658     *
659 jonen 1.2 * @package phpHtmlLib
660 jonen 1.1 */
661     class INPUTtag extends HTMLTagClass {
662     var $_tag = "input";
663 jonen 1.2 function _set_flags() {
664     parent::_set_flags();
665     $this->_flags &= ~(_CONTENTREQUIRED | _CLOSETAGREQUIRED);
666     }
667 jonen 1.1 } // INPUTtag
668    
669     /**
670     * <INS> tag class
671     *
672     * Defines inserted text.
673     *
674 jonen 1.2 * @package phpHtmlLib
675 jonen 1.1 */
676     class INStag extends HTMLTagClass {
677     var $_tag = "ins";
678     } // INStag
679    
680     /**
681     * <KBD> tag class
682     *
683     * Defines keyboard text
684     *
685 jonen 1.2 * @package phpHtmlLib
686 jonen 1.1 */
687     class KBDtag extends HTMLTagClass {
688     var $_tag = "kbd";
689     } // KBDtag
690    
691    
692     /**
693     * <LABEL> tag class
694     *
695     * Defines a label to a control. If you
696     * click the text within the label element,
697     * it is supposed to toggle the control.
698     *
699     * NOTE: The "for" attribute binds a label
700     * to another element. Set the value
701     * of the "for" attribute equal to the
702     * value of the "id" attribute of the
703     * related element.
704     *
705 jonen 1.2 * @package phpHtmlLib
706 jonen 1.1 */
707     class LABELtag extends HTMLTagClass {
708     var $_tag = "label";
709     } // LABELtag
710    
711    
712     /**
713     * <LEGEND> tag class
714     *
715     * The legend element defines a caption
716     * for a fieldset.
717     *
718 jonen 1.2 * @package phpHtmlLib
719 jonen 1.1 */
720     class LEGENDtag extends HTMLTagClass {
721     var $_tag = "legend";
722     } // LEGENDtag
723    
724    
725     /**
726     * <LI> tag class
727     *
728     * The <li> tag defines the start of a list
729     * item. The <li> tag is used in both ordered
730     * (<ol>) and unordered lists (<ul>).
731     *
732     * OPTIONAL ATTRIBUTES
733     * type : 1, A, a, I, i DEPRICATED
734     *
735 jonen 1.2 * @package phpHtmlLib
736 jonen 1.1 */
737     class LItag extends HTMLTagClass {
738     var $_tag = "li";
739     } // LItag
740    
741    
742    
743     /**
744     * <LINK> tag class
745     *
746     * This element defines the relationship between
747     * two linked documents.
748     *
749     * NOTE: This element goes only in the head section,
750     * but it can appear any number of times.
751     *
752 jonen 1.2 * @package phpHtmlLib
753 jonen 1.1 */
754     class LINKtag extends HTMLTagClass {
755     var $_tag = "link";
756     var $_debug_link_attributes = array("href");
757     var $_htmlentities_attributes = array("href");
758 jonen 1.2 function _set_flags() {
759     parent::_set_flags();
760     $this->_flags &= ~(_CONTENTREQUIRED | _CLOSETAGREQUIRED);
761     }
762 jonen 1.1 } // LINKtag
763    
764    
765    
766     /**
767     * <MAP> tag class
768     *
769     * Defines an image map. An image map is an
770     * image with clickable regions.
771     *
772 jonen 1.2 * @package phpHtmlLib
773 jonen 1.1 */
774     class MAPtag extends HTMLTagClass {
775     var $_tag = "map";
776     } // MAPtag
777    
778     /**
779     * <META> tag class
780     *
781     * The <meta> element provides meta-information
782     * about your page, such as descriptions and
783     * keywords for search engines.
784     *
785     * NOTE: The <meta> tag always goes inside the head element.
786     *
787     * REQUIRED ATTRIBUTES
788     * content : text
789     * Sets meta information to be associated
790     * with http-equiv or name.
791     *
792 jonen 1.2 * @package phpHtmlLib
793 jonen 1.1 */
794     class METAtag extends HTMLTagClass {
795     var $_tag = "meta";
796 jonen 1.2 function _set_flags() {
797     parent::_set_flags();
798     $this->_flags &= ~(_CONTENTREQUIRED | _CLOSETAGREQUIRED);
799     }
800 jonen 1.1 } // METAtag
801    
802    
803     /**
804     * <NOBR> tag class
805     *
806     * NOTE: This tag doesn't really
807     * exist in the HTML spec
808     * NOT WISE TO USE IT.
809     * @deprecated
810 jonen 1.2 * @package phpHtmlLib
811 jonen 1.1 */
812     class NOBRtag extends HTMLTagClass {
813     var $_tag = "nobr";
814 jonen 1.2 function _set_flags() {
815     parent::_set_flags();
816     $this->_flags |= _DEPRICATED;
817     }
818 jonen 1.1 } // NOBRtag
819    
820    
821     /**
822     * <NOFRAMES> tag class
823     *
824     * The noframes element displays text for
825     * browsers that do not handle frames. The
826     * noframes element goes inside the frameset
827     * element.
828     *
829 jonen 1.2 * @package phpHtmlLib
830 jonen 1.1 */
831     class NOFRAMEStag extends HTMLTagClass {
832     var $_tag = "noframes";
833     } // NOFRAMEtag
834    
835    
836    
837     /**
838     * <NOSCRIPT> tag class
839     *
840     * The noscript element is used to define
841     * an alternate content (text) if a script
842     * is NOT executed.
843     *
844     * NO ATTRIBUTES
845     *
846 jonen 1.2 * @package phpHtmlLib
847 jonen 1.1 */
848     class NOSCRIPTtag extends HTMLTagClass {
849     var $_tag = "noscript";
850     } // NOSCRIPTtag
851    
852     /**
853     * <OBJECT> tag class
854     *
855     * Defines an embedded object. Use this element
856     * to insert multimedia into your page.
857     *
858 jonen 1.2 * @package phpHtmlLib
859 jonen 1.1 */
860     class OBJECTtag extends HTMLTagClass {
861     var $_tag = "object";
862     } // OBJECTtag
863    
864     /**
865     * <OL> tag class
866     *
867     * The <ol> tag defines the start of an ordered list.
868     *
869     * OPTIONAL ATTRIBUTES
870     * type : 1,A,a,I,i DEPRICATED DO NOT USE
871     *
872 jonen 1.2 * @package phpHtmlLib
873 jonen 1.1 */
874     class OLtag extends HTMLTagClass {
875     var $_tag = "ol";
876     /**
877     * add content onto content stack
878     * adds content to tag as a FIFO.
879     * You can have n number of parameters.
880     * each one will get added in succession to the content.
881     *
882     * we override this from the parent so we can auto detect if
883     * the user is adding raw strings instead of objects.
884     * If they are trying to add raw strings, then we wrap that in
885     * an LItag object, since you can't add anything other then an <LI>
886     * @param mixed $content - either string, or tag object.
887     * @access public
888     */
889     function add() {
890     $args = func_get_args();
891    
892     foreach( $args as $content) {
893    
894     if (!is_object($content) || (@$content->_tag != "li") ) {
895     //$content is raw (string)
896     //lets wrap it in a <LI> object
897     $li = new LItag;
898     $li->add( $content );
899     HTMLTagClass::add( $li );
900     } else {
901     //looks like this is some object
902     //let the user do it.
903     //should we only let them push a
904     //<LI> object?
905     HTMLTagClass::add( $content );
906     }
907     }
908     }
909    
910     /**
911     * push content onto content stack
912     * adds content to tag as a FIFO
913     * You can only add 1 element at a time, and
914     * it will be added as a reference. So you can't do
915     * push_reference("something");, since "something" is a
916     * static.
917     *
918     * we override this from the parent so we can auto detect if
919     * the user is adding raw strings instead of objects.
920     * If they are trying to add raw strings, then we wrap that in
921     * an LItag object, since you can't add anything other then an <LI>
922     * @param mixed $content - either string, or tag object.
923     * the tag object gets stored as a
924     * reference to the original, so you
925     * can push it, then modify it later.
926     * @access public
927     */
928     function add_reference( &$content ) {
929     if (!is_object($content) || (@$content->_tag != "li") ) {
930     //$content is raw (string)
931     //lets wrap it in a <LI> object
932     $li = new LItag;
933     $li->add_reference( $content );
934     HTMLTagClass::add_reference( $li );
935     } else {
936     //looks like this is some object
937     //let the user do it.
938     //should we only let them push a
939     //<LI> object?
940     HTMLTagClass::add_reference( $content );
941     }
942     }
943     } // OLtag
944    
945    
946     /**
947     * <OPTGROUP> tag class
948     *
949     * Defines an option group. This element allows
950     * you to group choices. When you have a long list
951     * of options, groups of related choices are easier
952     * to handle.
953     *
954 jonen 1.2 * @package phpHtmlLib
955 jonen 1.1 */
956     class OPTGROUPtag extends HTMLTagClass {
957     var $_tag = "optgroup";
958     } // OPTGROUPtag
959    
960    
961     /**
962     * <OPTION> tag class
963     *
964     * The option element defines an option in the
965     * drop-down box.
966     *
967 jonen 1.2 * @package phpHtmlLib
968 jonen 1.1 */
969     class OPTIONtag extends HTMLTagClass {
970     var $_tag = "option";
971 jonen 1.2 function _set_flags() {
972     parent::_set_flags();
973     $this->_flags &= ~_NEWLINEAFTEROPENTAG;
974     }
975    
976 jonen 1.1 } // OPTIONtag
977    
978    
979    
980     /**
981     * <P> tag class
982     *
983     * The <p> tag defines a paragraph.
984     *
985     * OPTIONAL ATTRIBUTES
986     * align : left, center, right DEPRICATED DO NOT USE
987     *
988 jonen 1.2 * @package phpHtmlLib
989 jonen 1.1 */
990     class Ptag extends HTMLTagClass {
991     var $_tag = "p";
992     } // Ptag
993    
994    
995     /**
996     * <PARAM> tag class
997     *
998     * The param element allows you to specify
999     * the run-time settings for an object inserted
1000     * into HTML documents.
1001     *
1002     * REQUIRED ATTRIBUTES
1003     * name : the name of the param
1004     *
1005 jonen 1.2 * @package phpHtmlLib
1006 jonen 1.1 */
1007     class PARAMtag extends HTMLTagClass {
1008     var $_tag = "param";
1009     } // PARAMtag
1010    
1011     /**
1012     * <PRE> tag class
1013     *
1014     * The pre element defines preformatted text.
1015     * The text enclosed in the pre element usually
1016     * preserves spaces and line breaks. The text
1017     * renders in a fixed-pitch font.
1018     *
1019 jonen 1.2 * @package phpHtmlLib
1020 jonen 1.1 */
1021     class PREtag extends HTMLTagClass {
1022     var $_tag = "pre";
1023     } // PREtag
1024    
1025    
1026    
1027     /**
1028     * <Q> tag class
1029     *
1030     * The <q> tag defines the start of a short quotation.
1031     *
1032     * NOTE: The q element does not render as anything
1033     * special, you have to use styles to format
1034     * the text.
1035     *
1036 jonen 1.2 * @package phpHtmlLib
1037 jonen 1.1 */
1038     class Qtag extends HTMLTagClass {
1039     var $_tag = "q";
1040     } // Qtag
1041    
1042    
1043     /**
1044     * <S> tag class
1045     *
1046     * @deprecated USE <del> instead
1047     *
1048 jonen 1.2 * @package phpHtmlLib
1049 jonen 1.1 */
1050     class Stag extends HTMLTagClass {
1051     var $_tag = "s";
1052 jonen 1.2 function _set_flags() {
1053     parent::_set_flags();
1054     $this->_flags |= _DEPRICATED;
1055     }
1056 jonen 1.1 } // Stag
1057    
1058    
1059     /**
1060     * <SAMP> tag class
1061     *
1062     * Defines sample computer code.
1063     *
1064 jonen 1.2 * @package phpHtmlLib
1065 jonen 1.1 */
1066     class SAMPtag extends HTMLTagClass {
1067     var $_tag = "samp";
1068     } // SAMPtag
1069    
1070    
1071     /**
1072     * <SCRIPT> tag class
1073     *
1074     * Defines a script, such as JavaScript.
1075     *
1076     * REQUIRED ATTRIBUTES
1077     * type : text/ecmascript, text/javascript,
1078     * text/jscript, text/vbscript,
1079     * text/vbs, text/xml
1080     * The MIME type of the script.
1081     *
1082     * OPTIONAL ATTRIBUTES
1083     * language : javascript, livescript, vbscript
1084     * other DEPRICATED DO NOT USE
1085     *
1086 jonen 1.2 * @package phpHtmlLib
1087 jonen 1.1 */
1088     class SCRIPTtag extends HTMLTagClass {
1089     var $_tag = "script";
1090     var $_debug_link_attributes = array("src");
1091     var $_htmlentities_attributes = array("src");
1092     } // SCRIPTtag
1093    
1094    
1095     /**
1096     * <SELECT> tag class
1097     *
1098     * The select element creates a drop-down box.
1099     *
1100 jonen 1.2 * @package phpHtmlLib
1101 jonen 1.1 */
1102     class SELECTtag extends HTMLTagClass {
1103     var $_tag = "select";
1104     } // SELECTtag
1105    
1106    
1107    
1108     /**
1109     * <SMALL> tag class
1110     *
1111     * Renders as smaller text
1112     *
1113 jonen 1.2 * @package phpHtmlLib
1114 jonen 1.1 */
1115     class SMALLtag extends HTMLTagClass {
1116     var $_tag = "small";
1117     } // SMALLtag
1118    
1119    
1120     /**
1121     * <SPAN> tag class
1122     *
1123     * The <span> tag defines a section in a document.
1124     *
1125     * NOTE: Browsers do not place a line break before
1126     * or after the <span> tag.
1127     *
1128 jonen 1.2 * @package phpHtmlLib
1129 jonen 1.1 */
1130     class SPANtag extends HTMLTagClass {
1131     var $_tag = "span";
1132     } // SPANtag
1133    
1134    
1135     /**
1136     * <STRONG> tag class
1137     *
1138     * Renders as strong emphasized text
1139 jonen 1.2 * @package phpHtmlLib
1140 jonen 1.1 *
1141     */
1142     class STRONGtag extends HTMLTagClass {
1143     var $_tag = "strong";
1144     } // STRONGtag
1145    
1146    
1147     /**
1148     * <STYLE> tag class
1149     *
1150     * Defines a style in a document. The style
1151     * element goes in the head section. If you
1152     * want to include a style sheet in your page,
1153     * you should define the style sheet externally,
1154     * and link to it using <link>.
1155     *
1156     * REQUIRED ATTRIBUTES
1157     * type : text/css, text/javascript
1158 jonen 1.2 * @package phpHtmlLib
1159 jonen 1.1 */
1160     class STYLEtag extends HTMLTagClass {
1161     var $_tag = "style";
1162     } // STYLEtag
1163    
1164    
1165     /**
1166     * <SUB> tag class
1167     *
1168     * defines a subscript text
1169     *
1170 jonen 1.2 * @package phpHtmlLib
1171 jonen 1.1 */
1172     class SUBtag extends HTMLTagClass {
1173     var $_tag = "sub";
1174     } // SUBtag
1175    
1176    
1177     /**
1178     * <SUP> tag class
1179     *
1180     * defines a superscript text
1181     *
1182 jonen 1.2 * @package phpHtmlLib
1183 jonen 1.1 */
1184     class SUPtag extends HTMLTagClass {
1185     var $_tag = "sup";
1186     } // SUPtag
1187    
1188    
1189     /**
1190     * <TABLE> tag class
1191     *
1192     * The <table> tag defines the start of a table.
1193     * Inside a table row you can put table headers,
1194     * table rows, and table cells.
1195 jonen 1.2 * @package phpHtmlLib
1196 jonen 1.1 *
1197     */
1198     class TABLEtag extends HTMLTagClass {
1199     var $_tag = "table";
1200    
1201    
1202     /**
1203     * Holds the default attributes for all <tr>'s
1204     * @var array
1205     * @private
1206     */
1207     var $_default_row_attributes = array();
1208    
1209     /**
1210     * Holds the default attributes for all <td>'s
1211     * @var array
1212     * @private
1213     */
1214     var $_default_col_attributes = array();
1215    
1216    
1217    
1218     //****************************************************************
1219     // Table specific routines.
1220     //****************************************************************
1221    
1222    
1223    
1224     /**
1225     * push 1 row (tr) of content.
1226     * Content can be raw strings, or tag objects.
1227     * Can push 1 item, or multiple items in call. Each item
1228     * will be its own td. should call push() to push a
1229     * <TR> object, but we detect it here anyway.
1230     * This function does not save the content by reference.
1231     * It copies the content and pushes it into the table.
1232     * If you want to save a reference use push() instead.
1233     * @param mixed $args The <td>'s to push for next row
1234     * @return string
1235     * @public
1236     */
1237    
1238     function add_row() {
1239     $args = func_get_args();
1240     $tr = new TRtag( $this->_default_row_attributes );
1241     $tr->set_default_td_attributes( $this->_default_col_attributes );
1242    
1243     for ($x=0; $x <= func_num_args()-1; $x++) {
1244     if (is_object($args[$x])) {
1245     if ($args[$x]->_tag == "td") {
1246     $tr->add( $args[$x] );
1247     } else if ($args[$x]->_tag == "tr") {
1248     //the user is trying to use this
1249     //to add a TR object.
1250     if ($tr->count_content() >= 1) {
1251     //there is already content in
1252     //the current tr. This is an
1253     //error, since it doesn't make
1254     //sense to add data and a row
1255     //inside a row.
1256     return -1;
1257     } else {
1258     //user is using this to add
1259     //a row. We'll only add it then
1260     //bail.
1261     $tr = $args[$x];
1262     break;
1263     }
1264     } else {
1265     //we need to wrap this in its own td.
1266     $tr->add( $args[$x] );
1267     }
1268     } else {
1269     //user is adding raw string.
1270     //lets wrap it in a <tr><td>content</td></tr>
1271     $tr->add( $args[$x] );
1272     }
1273    
1274     }
1275     $this->add( $tr );
1276     }
1277    
1278     /**
1279     * Same ass add_row()
1280     *
1281     * NOTE: only exists for compatibility with 1.x
1282     *
1283     * @deprecated - use add()
1284     */
1285     function push_row( ) {
1286     $args = func_get_args();
1287     call_user_func_array( array(&$this, "add_row"), $args);
1288     }
1289    
1290     /**
1291     * Sets the default attributes for <tr>'s
1292     * that are added to the table. If there are
1293     * any attributes set for the <tr> it won't use
1294     * the defaults.
1295     *
1296     * @param array $attributes - the default attributes
1297     */
1298     function set_default_row_attributes( $attributes ) {
1299    
1300     $this->_default_row_attributes = $attributes;
1301     }
1302    
1303     /**
1304     * Sets the default attributes for <td>'s
1305     * that are added to the table. If there are
1306     * any attributes set for the <td> it won't use
1307     * the defaults.
1308     *
1309     * @param array $attributes - the default attributes
1310     */
1311     function set_default_col_attributes( $attributes ) {
1312    
1313     $this->_default_col_attributes = $attributes;
1314     }
1315    
1316    
1317    
1318     /**
1319     * update the attributes of a particular element or td.
1320     *
1321     * @param int $row row # of the table to edit
1322     * @param int $col column # of the table to edit
1323     * @param array $attributes array of name=>value pairs
1324     * @public
1325     *
1326     */
1327     function set_cell_attributes( $row, $col, $attributes=array() ) {
1328    
1329     if (is_object($this->_content[$row])) {
1330     if (is_object($this->_content[$row]->_content[$col])) {
1331     $this->_content[$row]->_content[$col]->set_tag_attributes( $attributes);
1332     }
1333     }
1334     }
1335    
1336     /**
1337     * update the attributes of a particular row or tr.
1338     *
1339     * @param int $row row # of the table to edit
1340     * @param int $col column # of the table to edit
1341     * @param array $attributes array of name=>value pairs
1342     * @public
1343     *
1344     */
1345     function set_row_attributes( $row, $attributes ) {
1346     if ($this->_content[$row]) {
1347     $this->_content[$row]->set_tag_attributes( $attributes );
1348     } else {
1349     return -1;
1350     }
1351     }
1352    
1353     function set_cell_content( $row, $col, $content) {
1354    
1355     $item = &$this->_get_element($row);
1356     if ( is_object($item) ) {
1357     $item = &$item->_get_element($col);
1358     if (is_object($item)) {
1359     $item->reset_content( $content );
1360     } else {
1361     return -1;
1362     }
1363     } else {
1364     return -1;
1365     }
1366     }
1367    
1368     } // TABLEtag
1369    
1370     /**
1371     * <TBODY> class.
1372     *
1373     * Defines a table body.
1374     *
1375 jonen 1.2 * @package phpHtmlLib
1376 jonen 1.1 */
1377     class TBODYtag extends TABLEtag {
1378    
1379     /**
1380     * Tag definition for class.
1381     * @var string
1382     * @private
1383     */
1384     var $_tag = "tbody";
1385    
1386     }// TBODYtag
1387    
1388    
1389     /**
1390     * Table data <TD> class.
1391     *
1392     * Defines a cell in a table.
1393     *
1394     * OPTIONAL ATTRIBUTES
1395     * bgcolor : color DEPRICATED DO NOT USE
1396     * height : pixels, % DEPRICATED DO NOT USE
1397     * width : pixels, % DEPRICATED
1398     * use styles instead like this <td style="width:100px;">
1399     *
1400 jonen 1.2 * @package phpHtmlLib
1401 jonen 1.1 */
1402     class TDtag extends HTMLTagClass {
1403     var $_tag = "td";
1404     }// TDtag
1405    
1406    
1407     /**
1408     * <TEXTAREA> tag class
1409     *
1410     * Defines a text-area (a multi-line text
1411     * input control).
1412     * The default font in the text-area is fixed pitch.
1413     *
1414     * REQUIRED ATTRIBUTES
1415     * cols : number
1416     * The width of the textarea, in characters.
1417     *
1418     * rows : number
1419     * The height of the textarea, in rows
1420     *
1421     * OPTIONAL ATTRIBUTES
1422     * wrap : soft, hard, off DEPRICATED DO NOT USE
1423     *
1424 jonen 1.2 * @package phpHtmlLib
1425 jonen 1.1 */
1426     class TEXTAREAtag extends HTMLTagClass {
1427     var $_tag = "textarea";
1428 jonen 1.2 function _set_flags() {
1429     parent::_set_flags();
1430     $this->_flags &= ~(_INDENT | _NEWLINEAFTEROPENTAG);
1431     }
1432 jonen 1.1 } // TEXTAREAtag
1433    
1434    
1435    
1436     /**
1437     * <TFOOT> tag class
1438     *
1439 jonen 1.2 * @package phpHtmlLib
1440 jonen 1.1 */
1441     class TFOOTtag extends TABLEtag {
1442     var $_tag = "tfoot";
1443     } // TFOOTtag
1444    
1445    
1446    
1447     /**
1448     * Table Header <TH> class.
1449     *
1450     * Defines a header cell in a table.
1451     * Very much the same as a data cell,
1452     * but rendered in bold and with a default
1453     * center alignment.
1454     *
1455     * OPTIONAL ATTRIBUTES
1456     * same as TDtag
1457     *
1458     * STANDARD ATTRIBUTES
1459     * same as TDtag
1460     *
1461     * EVENT ATTRIBUTES
1462     * same as TDtag
1463     *
1464 jonen 1.2 * @package phpHtmlLib
1465 jonen 1.1 */
1466     class THtag extends HTMLTagClass {
1467     var $_tag = "th";
1468     } // <TH>
1469    
1470     /**
1471     * Table Header <THEAD> class.
1472     *
1473     * defines a table header
1474     *
1475 jonen 1.2 * @package phpHtmlLib
1476 jonen 1.1 */
1477     class THEADtag extends TABLEtag {
1478     var $_tag = "thead";
1479     } // <TH>
1480    
1481    
1482     /**
1483     * <TITLE> tag class
1484     *
1485 jonen 1.2 * @package phpHtmlLib
1486 jonen 1.1 */
1487     class TITLEtag extends HTMLTagClass {
1488     var $_tag = "title";
1489     } // TITLEtag
1490    
1491    
1492     /**
1493     * Table Row <TR> class.
1494 jonen 1.2 * @package phpHtmlLib
1495 jonen 1.1 */
1496     class TRtag extends HTMLTagClass {
1497     var $_tag = "tr";
1498    
1499     /**
1500     * Holds the default attributes for all <td>'s
1501     * @var array
1502     * @private
1503     */
1504     var $_default_td_attributes = array();
1505    
1506     //****************************************************************
1507     // TR specific routines.
1508     //****************************************************************
1509    
1510     /**
1511     * Sets the default attributes for <td>'s
1512     * that are added to the table. If there are
1513     * any attributes set for the <td> it won't use
1514     * the defaults.
1515     *
1516     * @param array $attributes - the default attributes
1517     */
1518     function set_default_td_attributes( $attributes ) {
1519     $this->_default_td_attributes = $attributes;
1520     }
1521    
1522     /**
1523     * add content onto content stack
1524     * adds content to tag as a FIFO.
1525     * You can have n number of parameters.
1526     * each one will get added in succession to the content.
1527     *
1528     * we override this from the parent so we can auto detect if
1529     * the user is adding raw strings instead of objects.
1530     * If they are trying to add raw strings, then we wrap that in
1531     * a TDtag object, since you can't add anything other then a <TD> or
1532     * <TH> to a <TR>.
1533     * @param mixed $content - either string, or tag object.
1534     * @access public
1535     */
1536     function add() {
1537     $args = func_get_args();
1538    
1539     foreach( $args as $content) {
1540     if (!is_object($content) || (@$content->_tag != "td" &&
1541     @$content->_tag != "th") ) {
1542     //$content is raw (string)
1543     //lets wrap it in a <td> object
1544     $td = new TDtag( $this->_default_td_attributes );
1545     $td->add( $content );
1546     HTMLTagClass::add( $td );
1547     } else {
1548     //looks like this is some object
1549     //let the user do it.
1550     //should we only let them add a
1551     //<TD> object?
1552     HTMLTagClass::add( $content );
1553     }
1554     }
1555     }
1556    
1557     /**
1558     * add content onto content stack
1559     * adds content to tag as a FIFO
1560     * You can only add 1 element at a time, and
1561     * it will be added as a reference. So you can't do
1562     * add_reference("something");, since "something" is a
1563     * static.
1564     *
1565     * we override this from the parent so we can auto detect if
1566     * the user is adding raw strings instead of objects.
1567     * If they are trying to add raw strings, then we wrap that in
1568     * a TDtag object, since you can't add anything other then a <TD> or
1569     * <TH> to a <TR>.
1570     * @param mixed $content - either string, or tag object.
1571     * the tag object gets stored as a
1572     * reference to the original, so you
1573     * can add it, then modify it later.
1574     * @access public
1575     */
1576     function add_reference( &$content ) {
1577     if (!is_object($content) || (@$content->_tag != "td" &&
1578     @$content->_tag != "th") ) {
1579     //$content is raw (string)
1580     //lets wrap it in a <td> object
1581     $td = new TDtag;
1582     $td->add_reference( $content );
1583     HTMLTagClass::add_reference( $td );
1584     } else {
1585     //looks like this is some object
1586     //let the user do it.
1587     //should we only let them add a
1588     //<TD> object?
1589     HTMLTagClass::add_reference( $content );
1590     }
1591     }
1592    
1593     /**
1594     * Same ass add()
1595     *
1596     * NOTE: only exists for compatibility with 1.x
1597     *
1598     * @deprecated - use add()
1599     */
1600     function push() {
1601     $args = func_get_args();
1602     call_user_func_array( array(&$this, "add"), $args);
1603     }
1604    
1605     /**
1606     * Same ass add_reference()
1607     *
1608     * NOTE: only exists for compatibility with 1.x
1609     *
1610     * @deprecated - use add()
1611     */
1612     function push_reference( &$content ) {
1613     $this->add_reference( $content );
1614    
1615     }
1616    
1617     } // TRtag
1618    
1619     /**
1620     * <TT> tag class
1621 jonen 1.2 * @package phpHtmlLib
1622 jonen 1.1 */
1623     class TTtag extends HTMLTagClass {
1624     var $_tag = "tt";
1625     } // TTtag
1626    
1627     /**
1628     * <U> tag class
1629 jonen 1.2 * @package phpHtmlLib
1630 jonen 1.1 */
1631     class Utag extends HTMLTagClass {
1632     var $_tag = "u";
1633     } // Utag
1634    
1635    
1636     /**
1637     * <UL> tag class
1638 jonen 1.2 * @package phpHtmlLib
1639 jonen 1.1 */
1640     class ULtag extends OLtag {
1641     var $_tag = "ul";
1642     } // ULtag
1643    
1644     /**
1645     * <VAR> tag class
1646 jonen 1.2 * @package phpHtmlLib
1647 jonen 1.1 */
1648     class VARtag extends HTMLTagClass {
1649     var $_tag = "var";
1650     } // VARtag
1651    
1652    
1653     /**
1654     * <XMP> tag class
1655 jonen 1.2 * @package phpHtmlLib
1656 jonen 1.1 */
1657     class XMPtag extends HTMLTagClass {
1658     var $_tag = "xmp";
1659     } // XMPtag
1660    
1661     ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed