/[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.3 - (hide annotations)
Sat Sep 20 00:16:57 2003 UTC (20 years, 11 months ago) by jonen
Branch: MAIN
Changes since 1.2: +22 -3 lines
+ updated whole phphtmllib to v2.3.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.3 * $Id: ALLTAGS.inc,v 1.31 2003/05/21 18:02:13 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 jonen 1.3 * <!DOCTYPE> tag class
357     * @package phpHtmlLib
358     */
359     class DOCTYPEtag extends HTMLTagClass {
360     var $_tag = "!DOCTYPE";
361    
362     function _set_flags() {
363     parent::_set_flags();
364     $this->_flags &= ~(_CONTENTREQUIRED | _CLOSETAGREQUIRED);
365     $this->_flags |= _ALWAYS_UPPERCASE | _NOFINISHSLASHXHTML;
366     }
367     } //!DOCTYPEtag
368    
369     /**
370 jonen 1.1 * <DT> tag class
371     *
372     * The <dt> tag defines the start of a
373     * definition list.
374     *
375 jonen 1.2 * @package phpHtmlLib
376 jonen 1.1 */
377     class DTtag extends HTMLTagClass {
378     var $_tag = "dt";
379     } // DLtag
380    
381    
382     /**
383     * <EM> tag class
384     *
385     * Renders as emphasized text
386     *
387 jonen 1.2 * @package phpHtmlLib
388 jonen 1.1 */
389     class EMtag extends HTMLTagClass {
390     var $_tag = "em";
391     } // EMtag
392    
393    
394     /**
395     * <FIELDSET> tag class
396     *
397     * The fieldset element draws a box
398     * around the text and other elements
399     * it contains.
400     *
401 jonen 1.2 * @package phpHtmlLib
402 jonen 1.1 */
403     class FIELDSETtag extends HTMLTagClass {
404     var $_tag = "fieldset";
405     } // FIELDSETtag
406    
407    
408    
409     /**
410     * <FONT> tag class
411     *
412     * @deprecated use styles instead
413     *
414 jonen 1.2 * @package phpHtmlLib
415 jonen 1.1 */
416     class FONTtag extends HTMLTagClass {
417     var $_tag = "font";
418 jonen 1.2 function _set_flags() {
419     parent::_set_flags();
420     $this->_flags |= _DEPRICATED;
421     }
422 jonen 1.1 } // FONTtag
423    
424    
425    
426     /**
427     * FORMtag <FORM> tag
428     *
429     * The form element creates a form
430     * for user input.
431     *
432     * REQUIRED ATTRIBUTES
433     * action : url
434     * Specifies where to send the
435     * data when the user pushes the
436     * submit button in a form.
437     *
438 jonen 1.2 * @package phpHtmlLib
439 jonen 1.1 */
440     class FORMtag extends HTMLTagClass {
441     var $_tag = "form";
442 jonen 1.3 var $_xhtml_strict_attributes = array("name", "target");
443 jonen 1.1 } // FORMtag
444    
445    
446    
447     /**
448     * <FRAME> tag class
449     *
450     * Defines a sub window (a frame).
451     *
452 jonen 1.2 * @package phpHtmlLib
453 jonen 1.1 */
454     class FRAMEtag extends HTMLTagClass {
455     var $_tag = "frame";
456 jonen 1.2 function _set_flags() {
457     parent::_set_flags();
458     $this->_flags &= ~(_CONTENTREQUIRED | _CLOSETAGREQUIRED);
459     }
460 jonen 1.1 } // FRAMEtag
461    
462     /**
463     * <FRAMESET> tag class
464     *
465     * The frameset element defines a
466     * frameset.
467     *
468 jonen 1.2 * @package phpHtmlLib
469 jonen 1.1 */
470     class FRAMESETtag extends HTMLTagClass {
471     var $_tag = "frameset";
472     } // FRAMESETtag
473    
474    
475     /**
476     * <H1> tag class
477     *
478     * Defines a header
479     *
480 jonen 1.2 * @package phpHtmlLib
481 jonen 1.1 */
482     class H1tag extends HTMLTagClass {
483     var $_tag = "h1";
484 jonen 1.2 function _set_flags() {
485     parent::_set_flags();
486     $this->_flags &= ~_NEWLINEAFTEROPENTAG;
487     }
488 jonen 1.1 } // H1tag
489    
490    
491     /**
492     * <H2> tag class
493     *
494     * Defines a header
495     *
496 jonen 1.2 * @package phpHtmlLib
497 jonen 1.1 */
498     class H2tag extends HTMLTagClass {
499     var $_tag = "h2";
500 jonen 1.2 function _set_flags() {
501     parent::_set_flags();
502     $this->_flags &= ~_NEWLINEAFTEROPENTAG;
503     }
504 jonen 1.1 } // H2tag
505    
506    
507     /**
508     * <H3> tag class
509     *
510     * Defines a header
511     *
512 jonen 1.2 * @package phpHtmlLib
513 jonen 1.1 */
514     class H3tag extends HTMLTagClass {
515     var $_tag = "h3";
516 jonen 1.2 function _set_flags() {
517     parent::_set_flags();
518     $this->_flags &= ~_NEWLINEAFTEROPENTAG;
519     }
520 jonen 1.1 } // H3tag
521    
522    
523     /**
524     * <H4> tag class
525     *
526     * Defines a header
527     *
528 jonen 1.2 * @package phpHtmlLib
529 jonen 1.1 */
530     class H4tag extends HTMLTagClass {
531     var $_tag = "h4";
532 jonen 1.2 function _set_flags() {
533     parent::_set_flags();
534     $this->_flags &= ~_NEWLINEAFTEROPENTAG;
535     }
536 jonen 1.1 } // H4tag
537    
538    
539     /**
540     * <H5> tag class
541     *
542     * Defines a header
543     *
544 jonen 1.2 * @package phpHtmlLib
545 jonen 1.1 */
546     class H5tag extends HTMLTagClass {
547     var $_tag = "h5";
548 jonen 1.2 function _set_flags() {
549     parent::_set_flags();
550     $this->_flags &= ~_NEWLINEAFTEROPENTAG;
551     }
552 jonen 1.1 } // H5tag
553    
554    
555     /**
556     * <H6> tag class
557     *
558     * Defines a header
559     *
560 jonen 1.2 * @package phpHtmlLib
561 jonen 1.1 */
562     class H6tag extends HTMLTagClass {
563     var $_tag = "h6";
564 jonen 1.2 function _set_flags() {
565     parent::_set_flags();
566     $this->_flags &= ~_NEWLINEAFTEROPENTAG;
567     }
568 jonen 1.1 } //H6tag
569    
570    
571     /**
572     * <HEAD> tag class
573     *
574     * The head element can contain information
575     * about the document.
576     *
577 jonen 1.2 * @package phpHtmlLib
578 jonen 1.1 */
579     class HEADtag extends HTMLTagClass {
580     var $_tag = "head";
581     } // HEADtag
582    
583    
584    
585     /**
586     * <HR> tag class
587     *
588     * inserts a horizontal rule.
589     *
590     * NOTE: All the "presentation attributes"
591     * of the hr element have been
592     * deprecated, in favor of style sheets.
593     *
594 jonen 1.2 * @package phpHtmlLib
595 jonen 1.1 */
596     class HRtag extends HTMLTagClass {
597     var $_tag = "hr";
598 jonen 1.2 function _set_flags() {
599     parent::_set_flags();
600     $this->_flags &= ~_NEWLINEAFTEROPENTAG;
601     }
602 jonen 1.1 } // HRtag
603    
604    
605    
606     /**
607     * <HTML> tag class.
608     *
609 jonen 1.2 * @package phpHtmlLib
610 jonen 1.1 */
611     class HTMLtag extends HTMLTagClass {
612     var $_tag = "html";
613     } // HTMLtag
614    
615    
616     /**
617     * <I> tag class
618     *
619     * Renders as italic text
620     *
621 jonen 1.2 * @package phpHtmlLib
622 jonen 1.1 */
623     class Itag extends HTMLTagClass {
624     var $_tag = "i";
625     } // Itag
626    
627    
628     /**
629     * <IFRAME> tag class
630     *
631     * The iframe element creates an inline
632     * frame that contains another document.
633     *
634 jonen 1.2 * @package phpHtmlLib
635 jonen 1.1 */
636     class IFRAMEtag extends HTMLTagClass {
637     var $_tag = "iframe";
638     } // IFRAMEtag
639    
640    
641     /**
642     * <IMG> tag class
643     *
644     * This element inserts an image.
645     *
646     * REQUIRED ATTRIBUTES
647     * src : url
648     * The address of the image you want
649     * to insert
650     * alt : text
651     * A short description of the image.
652     * Use it for text-only browsers
653     *
654 jonen 1.2 * @package phpHtmlLib
655 jonen 1.1 */
656     class IMGtag extends HTMLTagClass {
657     var $_tag = "img";
658     var $_debug_link_attributes = array("src");
659     var $_xhtml_strict_attributes = array("border");
660     var $_htmlentities_attributes = array("src");
661 jonen 1.2 function _set_flags() {
662     parent::_set_flags();
663     $this->_flags &= ~(_CONTENTREQUIRED | _CLOSETAGREQUIRED);
664     }
665 jonen 1.1
666     } // IMGtag
667    
668     /**
669     * INPUTtag <INPUT> tag
670     *
671     * The <input> tag defines the start of an input
672     * field where the user can enter data.
673     *
674 jonen 1.2 * @package phpHtmlLib
675 jonen 1.1 */
676     class INPUTtag extends HTMLTagClass {
677     var $_tag = "input";
678 jonen 1.2 function _set_flags() {
679     parent::_set_flags();
680     $this->_flags &= ~(_CONTENTREQUIRED | _CLOSETAGREQUIRED);
681     }
682 jonen 1.1 } // INPUTtag
683    
684     /**
685     * <INS> tag class
686     *
687     * Defines inserted text.
688     *
689 jonen 1.2 * @package phpHtmlLib
690 jonen 1.1 */
691     class INStag extends HTMLTagClass {
692     var $_tag = "ins";
693     } // INStag
694    
695     /**
696     * <KBD> tag class
697     *
698     * Defines keyboard text
699     *
700 jonen 1.2 * @package phpHtmlLib
701 jonen 1.1 */
702     class KBDtag extends HTMLTagClass {
703     var $_tag = "kbd";
704     } // KBDtag
705    
706    
707     /**
708     * <LABEL> tag class
709     *
710     * Defines a label to a control. If you
711     * click the text within the label element,
712     * it is supposed to toggle the control.
713     *
714     * NOTE: The "for" attribute binds a label
715     * to another element. Set the value
716     * of the "for" attribute equal to the
717     * value of the "id" attribute of the
718     * related element.
719     *
720 jonen 1.2 * @package phpHtmlLib
721 jonen 1.1 */
722     class LABELtag extends HTMLTagClass {
723     var $_tag = "label";
724     } // LABELtag
725    
726    
727     /**
728     * <LEGEND> tag class
729     *
730     * The legend element defines a caption
731     * for a fieldset.
732     *
733 jonen 1.2 * @package phpHtmlLib
734 jonen 1.1 */
735     class LEGENDtag extends HTMLTagClass {
736     var $_tag = "legend";
737     } // LEGENDtag
738    
739    
740     /**
741     * <LI> tag class
742     *
743     * The <li> tag defines the start of a list
744     * item. The <li> tag is used in both ordered
745     * (<ol>) and unordered lists (<ul>).
746     *
747     * OPTIONAL ATTRIBUTES
748     * type : 1, A, a, I, i DEPRICATED
749     *
750 jonen 1.2 * @package phpHtmlLib
751 jonen 1.1 */
752     class LItag extends HTMLTagClass {
753     var $_tag = "li";
754     } // LItag
755    
756    
757    
758     /**
759     * <LINK> tag class
760     *
761     * This element defines the relationship between
762     * two linked documents.
763     *
764     * NOTE: This element goes only in the head section,
765     * but it can appear any number of times.
766     *
767 jonen 1.2 * @package phpHtmlLib
768 jonen 1.1 */
769     class LINKtag extends HTMLTagClass {
770     var $_tag = "link";
771     var $_debug_link_attributes = array("href");
772     var $_htmlentities_attributes = array("href");
773 jonen 1.2 function _set_flags() {
774     parent::_set_flags();
775     $this->_flags &= ~(_CONTENTREQUIRED | _CLOSETAGREQUIRED);
776     }
777 jonen 1.1 } // LINKtag
778    
779    
780    
781     /**
782     * <MAP> tag class
783     *
784     * Defines an image map. An image map is an
785     * image with clickable regions.
786     *
787 jonen 1.2 * @package phpHtmlLib
788 jonen 1.1 */
789     class MAPtag extends HTMLTagClass {
790     var $_tag = "map";
791     } // MAPtag
792    
793     /**
794     * <META> tag class
795     *
796     * The <meta> element provides meta-information
797     * about your page, such as descriptions and
798     * keywords for search engines.
799     *
800     * NOTE: The <meta> tag always goes inside the head element.
801     *
802     * REQUIRED ATTRIBUTES
803     * content : text
804     * Sets meta information to be associated
805     * with http-equiv or name.
806     *
807 jonen 1.2 * @package phpHtmlLib
808 jonen 1.1 */
809     class METAtag extends HTMLTagClass {
810     var $_tag = "meta";
811 jonen 1.2 function _set_flags() {
812     parent::_set_flags();
813     $this->_flags &= ~(_CONTENTREQUIRED | _CLOSETAGREQUIRED);
814     }
815 jonen 1.1 } // METAtag
816    
817    
818     /**
819     * <NOBR> tag class
820     *
821     * NOTE: This tag doesn't really
822     * exist in the HTML spec
823     * NOT WISE TO USE IT.
824     * @deprecated
825 jonen 1.2 * @package phpHtmlLib
826 jonen 1.1 */
827     class NOBRtag extends HTMLTagClass {
828     var $_tag = "nobr";
829 jonen 1.2 function _set_flags() {
830     parent::_set_flags();
831     $this->_flags |= _DEPRICATED;
832     }
833 jonen 1.1 } // NOBRtag
834    
835    
836     /**
837     * <NOFRAMES> tag class
838     *
839     * The noframes element displays text for
840     * browsers that do not handle frames. The
841     * noframes element goes inside the frameset
842     * element.
843     *
844 jonen 1.2 * @package phpHtmlLib
845 jonen 1.1 */
846     class NOFRAMEStag extends HTMLTagClass {
847     var $_tag = "noframes";
848     } // NOFRAMEtag
849    
850    
851    
852     /**
853     * <NOSCRIPT> tag class
854     *
855     * The noscript element is used to define
856     * an alternate content (text) if a script
857     * is NOT executed.
858     *
859     * NO ATTRIBUTES
860     *
861 jonen 1.2 * @package phpHtmlLib
862 jonen 1.1 */
863     class NOSCRIPTtag extends HTMLTagClass {
864     var $_tag = "noscript";
865     } // NOSCRIPTtag
866    
867     /**
868     * <OBJECT> tag class
869     *
870     * Defines an embedded object. Use this element
871     * to insert multimedia into your page.
872     *
873 jonen 1.2 * @package phpHtmlLib
874 jonen 1.1 */
875     class OBJECTtag extends HTMLTagClass {
876     var $_tag = "object";
877     } // OBJECTtag
878    
879     /**
880     * <OL> tag class
881     *
882     * The <ol> tag defines the start of an ordered list.
883     *
884     * OPTIONAL ATTRIBUTES
885     * type : 1,A,a,I,i DEPRICATED DO NOT USE
886     *
887 jonen 1.2 * @package phpHtmlLib
888 jonen 1.1 */
889     class OLtag extends HTMLTagClass {
890     var $_tag = "ol";
891     /**
892     * add content onto content stack
893     * adds content to tag as a FIFO.
894     * You can have n number of parameters.
895     * each one will get added in succession to the content.
896     *
897     * we override this from the parent so we can auto detect if
898     * the user is adding raw strings instead of objects.
899     * If they are trying to add raw strings, then we wrap that in
900     * an LItag object, since you can't add anything other then an <LI>
901     * @param mixed $content - either string, or tag object.
902     * @access public
903     */
904     function add() {
905     $args = func_get_args();
906    
907     foreach( $args as $content) {
908    
909     if (!is_object($content) || (@$content->_tag != "li") ) {
910     //$content is raw (string)
911     //lets wrap it in a <LI> object
912     $li = new LItag;
913     $li->add( $content );
914     HTMLTagClass::add( $li );
915     } else {
916     //looks like this is some object
917     //let the user do it.
918     //should we only let them push a
919     //<LI> object?
920     HTMLTagClass::add( $content );
921     }
922     }
923     }
924    
925     /**
926     * push content onto content stack
927     * adds content to tag as a FIFO
928     * You can only add 1 element at a time, and
929     * it will be added as a reference. So you can't do
930     * push_reference("something");, since "something" is a
931     * static.
932     *
933     * we override this from the parent so we can auto detect if
934     * the user is adding raw strings instead of objects.
935     * If they are trying to add raw strings, then we wrap that in
936     * an LItag object, since you can't add anything other then an <LI>
937     * @param mixed $content - either string, or tag object.
938     * the tag object gets stored as a
939     * reference to the original, so you
940     * can push it, then modify it later.
941     * @access public
942     */
943     function add_reference( &$content ) {
944     if (!is_object($content) || (@$content->_tag != "li") ) {
945     //$content is raw (string)
946     //lets wrap it in a <LI> object
947     $li = new LItag;
948     $li->add_reference( $content );
949     HTMLTagClass::add_reference( $li );
950     } else {
951     //looks like this is some object
952     //let the user do it.
953     //should we only let them push a
954     //<LI> object?
955     HTMLTagClass::add_reference( $content );
956     }
957     }
958     } // OLtag
959    
960    
961     /**
962     * <OPTGROUP> tag class
963     *
964     * Defines an option group. This element allows
965     * you to group choices. When you have a long list
966     * of options, groups of related choices are easier
967     * to handle.
968     *
969 jonen 1.2 * @package phpHtmlLib
970 jonen 1.1 */
971     class OPTGROUPtag extends HTMLTagClass {
972     var $_tag = "optgroup";
973     } // OPTGROUPtag
974    
975    
976     /**
977     * <OPTION> tag class
978     *
979     * The option element defines an option in the
980     * drop-down box.
981     *
982 jonen 1.2 * @package phpHtmlLib
983 jonen 1.1 */
984     class OPTIONtag extends HTMLTagClass {
985     var $_tag = "option";
986 jonen 1.2 function _set_flags() {
987     parent::_set_flags();
988     $this->_flags &= ~_NEWLINEAFTEROPENTAG;
989     }
990    
991 jonen 1.1 } // OPTIONtag
992    
993    
994    
995     /**
996     * <P> tag class
997     *
998     * The <p> tag defines a paragraph.
999     *
1000     * OPTIONAL ATTRIBUTES
1001     * align : left, center, right DEPRICATED DO NOT USE
1002     *
1003 jonen 1.2 * @package phpHtmlLib
1004 jonen 1.1 */
1005     class Ptag extends HTMLTagClass {
1006     var $_tag = "p";
1007     } // Ptag
1008    
1009    
1010     /**
1011     * <PARAM> tag class
1012     *
1013     * The param element allows you to specify
1014     * the run-time settings for an object inserted
1015     * into HTML documents.
1016     *
1017     * REQUIRED ATTRIBUTES
1018     * name : the name of the param
1019     *
1020 jonen 1.2 * @package phpHtmlLib
1021 jonen 1.1 */
1022     class PARAMtag extends HTMLTagClass {
1023     var $_tag = "param";
1024     } // PARAMtag
1025    
1026     /**
1027     * <PRE> tag class
1028     *
1029     * The pre element defines preformatted text.
1030     * The text enclosed in the pre element usually
1031     * preserves spaces and line breaks. The text
1032     * renders in a fixed-pitch font.
1033     *
1034 jonen 1.2 * @package phpHtmlLib
1035 jonen 1.1 */
1036     class PREtag extends HTMLTagClass {
1037     var $_tag = "pre";
1038 jonen 1.3 function _set_flags() {
1039     parent::_set_flags();
1040     $this->_flags &= ~_INDENT;
1041     }
1042 jonen 1.1 } // PREtag
1043    
1044    
1045    
1046     /**
1047     * <Q> tag class
1048     *
1049     * The <q> tag defines the start of a short quotation.
1050     *
1051     * NOTE: The q element does not render as anything
1052     * special, you have to use styles to format
1053     * the text.
1054     *
1055 jonen 1.2 * @package phpHtmlLib
1056 jonen 1.1 */
1057     class Qtag extends HTMLTagClass {
1058     var $_tag = "q";
1059     } // Qtag
1060    
1061    
1062     /**
1063     * <S> tag class
1064     *
1065     * @deprecated USE <del> instead
1066     *
1067 jonen 1.2 * @package phpHtmlLib
1068 jonen 1.1 */
1069     class Stag extends HTMLTagClass {
1070     var $_tag = "s";
1071 jonen 1.2 function _set_flags() {
1072     parent::_set_flags();
1073     $this->_flags |= _DEPRICATED;
1074     }
1075 jonen 1.1 } // Stag
1076    
1077    
1078     /**
1079     * <SAMP> tag class
1080     *
1081     * Defines sample computer code.
1082     *
1083 jonen 1.2 * @package phpHtmlLib
1084 jonen 1.1 */
1085     class SAMPtag extends HTMLTagClass {
1086     var $_tag = "samp";
1087     } // SAMPtag
1088    
1089    
1090     /**
1091     * <SCRIPT> tag class
1092     *
1093     * Defines a script, such as JavaScript.
1094     *
1095     * REQUIRED ATTRIBUTES
1096     * type : text/ecmascript, text/javascript,
1097     * text/jscript, text/vbscript,
1098     * text/vbs, text/xml
1099     * The MIME type of the script.
1100     *
1101     * OPTIONAL ATTRIBUTES
1102     * language : javascript, livescript, vbscript
1103     * other DEPRICATED DO NOT USE
1104     *
1105 jonen 1.2 * @package phpHtmlLib
1106 jonen 1.1 */
1107     class SCRIPTtag extends HTMLTagClass {
1108     var $_tag = "script";
1109     var $_debug_link_attributes = array("src");
1110     var $_htmlentities_attributes = array("src");
1111     } // SCRIPTtag
1112    
1113    
1114     /**
1115     * <SELECT> tag class
1116     *
1117     * The select element creates a drop-down box.
1118     *
1119 jonen 1.2 * @package phpHtmlLib
1120 jonen 1.1 */
1121     class SELECTtag extends HTMLTagClass {
1122     var $_tag = "select";
1123     } // SELECTtag
1124    
1125    
1126    
1127     /**
1128     * <SMALL> tag class
1129     *
1130     * Renders as smaller text
1131     *
1132 jonen 1.2 * @package phpHtmlLib
1133 jonen 1.1 */
1134     class SMALLtag extends HTMLTagClass {
1135     var $_tag = "small";
1136     } // SMALLtag
1137    
1138    
1139     /**
1140     * <SPAN> tag class
1141     *
1142     * The <span> tag defines a section in a document.
1143     *
1144     * NOTE: Browsers do not place a line break before
1145     * or after the <span> tag.
1146     *
1147 jonen 1.2 * @package phpHtmlLib
1148 jonen 1.1 */
1149     class SPANtag extends HTMLTagClass {
1150     var $_tag = "span";
1151     } // SPANtag
1152    
1153    
1154     /**
1155     * <STRONG> tag class
1156     *
1157     * Renders as strong emphasized text
1158 jonen 1.2 * @package phpHtmlLib
1159 jonen 1.1 *
1160     */
1161     class STRONGtag extends HTMLTagClass {
1162     var $_tag = "strong";
1163     } // STRONGtag
1164    
1165    
1166     /**
1167     * <STYLE> tag class
1168     *
1169     * Defines a style in a document. The style
1170     * element goes in the head section. If you
1171     * want to include a style sheet in your page,
1172     * you should define the style sheet externally,
1173     * and link to it using <link>.
1174     *
1175     * REQUIRED ATTRIBUTES
1176     * type : text/css, text/javascript
1177 jonen 1.2 * @package phpHtmlLib
1178 jonen 1.1 */
1179     class STYLEtag extends HTMLTagClass {
1180     var $_tag = "style";
1181     } // STYLEtag
1182    
1183    
1184     /**
1185     * <SUB> tag class
1186     *
1187     * defines a subscript text
1188     *
1189 jonen 1.2 * @package phpHtmlLib
1190 jonen 1.1 */
1191     class SUBtag extends HTMLTagClass {
1192     var $_tag = "sub";
1193     } // SUBtag
1194    
1195    
1196     /**
1197     * <SUP> tag class
1198     *
1199     * defines a superscript text
1200     *
1201 jonen 1.2 * @package phpHtmlLib
1202 jonen 1.1 */
1203     class SUPtag extends HTMLTagClass {
1204     var $_tag = "sup";
1205     } // SUPtag
1206    
1207    
1208     /**
1209     * <TABLE> tag class
1210     *
1211     * The <table> tag defines the start of a table.
1212     * Inside a table row you can put table headers,
1213     * table rows, and table cells.
1214 jonen 1.2 * @package phpHtmlLib
1215 jonen 1.1 *
1216     */
1217     class TABLEtag extends HTMLTagClass {
1218     var $_tag = "table";
1219    
1220    
1221     /**
1222     * Holds the default attributes for all <tr>'s
1223     * @var array
1224     * @private
1225     */
1226     var $_default_row_attributes = array();
1227    
1228     /**
1229     * Holds the default attributes for all <td>'s
1230     * @var array
1231     * @private
1232     */
1233     var $_default_col_attributes = array();
1234    
1235    
1236    
1237     //****************************************************************
1238     // Table specific routines.
1239     //****************************************************************
1240    
1241    
1242    
1243     /**
1244     * push 1 row (tr) of content.
1245     * Content can be raw strings, or tag objects.
1246     * Can push 1 item, or multiple items in call. Each item
1247     * will be its own td. should call push() to push a
1248     * <TR> object, but we detect it here anyway.
1249     * This function does not save the content by reference.
1250     * It copies the content and pushes it into the table.
1251     * If you want to save a reference use push() instead.
1252     * @param mixed $args The <td>'s to push for next row
1253     * @return string
1254     * @public
1255     */
1256    
1257     function add_row() {
1258     $args = func_get_args();
1259     $tr = new TRtag( $this->_default_row_attributes );
1260     $tr->set_default_td_attributes( $this->_default_col_attributes );
1261    
1262     for ($x=0; $x <= func_num_args()-1; $x++) {
1263     if (is_object($args[$x])) {
1264 jonen 1.3 if (isset($args[$x]->_tag) && $args[$x]->_tag == "td") {
1265 jonen 1.1 $tr->add( $args[$x] );
1266 jonen 1.3 } else if (isset($args[$x]->_tag) && $args[$x]->_tag == "tr") {
1267 jonen 1.1 //the user is trying to use this
1268     //to add a TR object.
1269     if ($tr->count_content() >= 1) {
1270     //there is already content in
1271     //the current tr. This is an
1272     //error, since it doesn't make
1273     //sense to add data and a row
1274     //inside a row.
1275     return -1;
1276     } else {
1277     //user is using this to add
1278     //a row. We'll only add it then
1279     //bail.
1280     $tr = $args[$x];
1281     break;
1282     }
1283     } else {
1284     //we need to wrap this in its own td.
1285     $tr->add( $args[$x] );
1286     }
1287     } else {
1288     //user is adding raw string.
1289     //lets wrap it in a <tr><td>content</td></tr>
1290     $tr->add( $args[$x] );
1291     }
1292    
1293     }
1294     $this->add( $tr );
1295     }
1296    
1297     /**
1298     * Same ass add_row()
1299     *
1300     * NOTE: only exists for compatibility with 1.x
1301     *
1302     * @deprecated - use add()
1303     */
1304     function push_row( ) {
1305     $args = func_get_args();
1306     call_user_func_array( array(&$this, "add_row"), $args);
1307     }
1308    
1309     /**
1310     * Sets the default attributes for <tr>'s
1311     * that are added to the table. If there are
1312     * any attributes set for the <tr> it won't use
1313     * the defaults.
1314     *
1315     * @param array $attributes - the default attributes
1316     */
1317     function set_default_row_attributes( $attributes ) {
1318    
1319     $this->_default_row_attributes = $attributes;
1320     }
1321    
1322     /**
1323     * Sets the default attributes for <td>'s
1324     * that are added to the table. If there are
1325     * any attributes set for the <td> it won't use
1326     * the defaults.
1327     *
1328     * @param array $attributes - the default attributes
1329     */
1330     function set_default_col_attributes( $attributes ) {
1331    
1332     $this->_default_col_attributes = $attributes;
1333     }
1334    
1335    
1336    
1337     /**
1338     * update the attributes of a particular element or td.
1339     *
1340     * @param int $row row # of the table to edit
1341     * @param int $col column # of the table to edit
1342     * @param array $attributes array of name=>value pairs
1343     * @public
1344     *
1345     */
1346     function set_cell_attributes( $row, $col, $attributes=array() ) {
1347    
1348     if (is_object($this->_content[$row])) {
1349     if (is_object($this->_content[$row]->_content[$col])) {
1350     $this->_content[$row]->_content[$col]->set_tag_attributes( $attributes);
1351     }
1352     }
1353     }
1354    
1355     /**
1356     * update the attributes of a particular row or tr.
1357     *
1358     * @param int $row row # of the table to edit
1359     * @param int $col column # of the table to edit
1360     * @param array $attributes array of name=>value pairs
1361     * @public
1362     *
1363     */
1364     function set_row_attributes( $row, $attributes ) {
1365     if ($this->_content[$row]) {
1366     $this->_content[$row]->set_tag_attributes( $attributes );
1367     } else {
1368     return -1;
1369     }
1370     }
1371    
1372     function set_cell_content( $row, $col, $content) {
1373    
1374     $item = &$this->_get_element($row);
1375     if ( is_object($item) ) {
1376     $item = &$item->_get_element($col);
1377     if (is_object($item)) {
1378     $item->reset_content( $content );
1379     } else {
1380     return -1;
1381     }
1382     } else {
1383     return -1;
1384     }
1385     }
1386    
1387     } // TABLEtag
1388    
1389     /**
1390     * <TBODY> class.
1391     *
1392     * Defines a table body.
1393     *
1394 jonen 1.2 * @package phpHtmlLib
1395 jonen 1.1 */
1396     class TBODYtag extends TABLEtag {
1397    
1398     /**
1399     * Tag definition for class.
1400     * @var string
1401     * @private
1402     */
1403     var $_tag = "tbody";
1404    
1405     }// TBODYtag
1406    
1407    
1408     /**
1409     * Table data <TD> class.
1410     *
1411     * Defines a cell in a table.
1412     *
1413     * OPTIONAL ATTRIBUTES
1414     * bgcolor : color DEPRICATED DO NOT USE
1415     * height : pixels, % DEPRICATED DO NOT USE
1416     * width : pixels, % DEPRICATED
1417     * use styles instead like this <td style="width:100px;">
1418     *
1419 jonen 1.2 * @package phpHtmlLib
1420 jonen 1.1 */
1421     class TDtag extends HTMLTagClass {
1422     var $_tag = "td";
1423     }// TDtag
1424    
1425    
1426     /**
1427     * <TEXTAREA> tag class
1428     *
1429     * Defines a text-area (a multi-line text
1430     * input control).
1431     * The default font in the text-area is fixed pitch.
1432     *
1433     * REQUIRED ATTRIBUTES
1434     * cols : number
1435     * The width of the textarea, in characters.
1436     *
1437     * rows : number
1438     * The height of the textarea, in rows
1439     *
1440     * OPTIONAL ATTRIBUTES
1441     * wrap : soft, hard, off DEPRICATED DO NOT USE
1442     *
1443 jonen 1.2 * @package phpHtmlLib
1444 jonen 1.1 */
1445     class TEXTAREAtag extends HTMLTagClass {
1446     var $_tag = "textarea";
1447 jonen 1.2 function _set_flags() {
1448     parent::_set_flags();
1449     $this->_flags &= ~(_INDENT | _NEWLINEAFTEROPENTAG);
1450     }
1451 jonen 1.1 } // TEXTAREAtag
1452    
1453    
1454    
1455     /**
1456     * <TFOOT> tag class
1457     *
1458 jonen 1.2 * @package phpHtmlLib
1459 jonen 1.1 */
1460     class TFOOTtag extends TABLEtag {
1461     var $_tag = "tfoot";
1462     } // TFOOTtag
1463    
1464    
1465    
1466     /**
1467     * Table Header <TH> class.
1468     *
1469     * Defines a header cell in a table.
1470     * Very much the same as a data cell,
1471     * but rendered in bold and with a default
1472     * center alignment.
1473     *
1474     * OPTIONAL ATTRIBUTES
1475     * same as TDtag
1476     *
1477     * STANDARD ATTRIBUTES
1478     * same as TDtag
1479     *
1480     * EVENT ATTRIBUTES
1481     * same as TDtag
1482     *
1483 jonen 1.2 * @package phpHtmlLib
1484 jonen 1.1 */
1485     class THtag extends HTMLTagClass {
1486     var $_tag = "th";
1487     } // <TH>
1488    
1489     /**
1490     * Table Header <THEAD> class.
1491     *
1492     * defines a table header
1493     *
1494 jonen 1.2 * @package phpHtmlLib
1495 jonen 1.1 */
1496     class THEADtag extends TABLEtag {
1497     var $_tag = "thead";
1498     } // <TH>
1499    
1500    
1501     /**
1502     * <TITLE> tag class
1503     *
1504 jonen 1.2 * @package phpHtmlLib
1505 jonen 1.1 */
1506     class TITLEtag extends HTMLTagClass {
1507     var $_tag = "title";
1508     } // TITLEtag
1509    
1510    
1511     /**
1512     * Table Row <TR> class.
1513 jonen 1.2 * @package phpHtmlLib
1514 jonen 1.1 */
1515     class TRtag extends HTMLTagClass {
1516     var $_tag = "tr";
1517    
1518     /**
1519     * Holds the default attributes for all <td>'s
1520     * @var array
1521     * @private
1522     */
1523     var $_default_td_attributes = array();
1524    
1525     //****************************************************************
1526     // TR specific routines.
1527     //****************************************************************
1528    
1529     /**
1530     * Sets the default attributes for <td>'s
1531     * that are added to the table. If there are
1532     * any attributes set for the <td> it won't use
1533     * the defaults.
1534     *
1535     * @param array $attributes - the default attributes
1536     */
1537     function set_default_td_attributes( $attributes ) {
1538     $this->_default_td_attributes = $attributes;
1539     }
1540    
1541     /**
1542     * add content onto content stack
1543     * adds content to tag as a FIFO.
1544     * You can have n number of parameters.
1545     * each one will get added in succession to the content.
1546     *
1547     * we override this from the parent so we can auto detect if
1548     * the user is adding raw strings instead of objects.
1549     * If they are trying to add raw strings, then we wrap that in
1550     * a TDtag object, since you can't add anything other then a <TD> or
1551     * <TH> to a <TR>.
1552     * @param mixed $content - either string, or tag object.
1553     * @access public
1554     */
1555     function add() {
1556     $args = func_get_args();
1557    
1558     foreach( $args as $content) {
1559     if (!is_object($content) || (@$content->_tag != "td" &&
1560     @$content->_tag != "th") ) {
1561     //$content is raw (string)
1562     //lets wrap it in a <td> object
1563     $td = new TDtag( $this->_default_td_attributes );
1564     $td->add( $content );
1565     HTMLTagClass::add( $td );
1566     } else {
1567     //looks like this is some object
1568     //let the user do it.
1569     //should we only let them add a
1570     //<TD> object?
1571     HTMLTagClass::add( $content );
1572     }
1573     }
1574     }
1575    
1576     /**
1577     * add content onto content stack
1578     * adds content to tag as a FIFO
1579     * You can only add 1 element at a time, and
1580     * it will be added as a reference. So you can't do
1581     * add_reference("something");, since "something" is a
1582     * static.
1583     *
1584     * we override this from the parent so we can auto detect if
1585     * the user is adding raw strings instead of objects.
1586     * If they are trying to add raw strings, then we wrap that in
1587     * a TDtag object, since you can't add anything other then a <TD> or
1588     * <TH> to a <TR>.
1589     * @param mixed $content - either string, or tag object.
1590     * the tag object gets stored as a
1591     * reference to the original, so you
1592     * can add it, then modify it later.
1593     * @access public
1594     */
1595     function add_reference( &$content ) {
1596     if (!is_object($content) || (@$content->_tag != "td" &&
1597     @$content->_tag != "th") ) {
1598     //$content is raw (string)
1599     //lets wrap it in a <td> object
1600     $td = new TDtag;
1601     $td->add_reference( $content );
1602     HTMLTagClass::add_reference( $td );
1603     } else {
1604     //looks like this is some object
1605     //let the user do it.
1606     //should we only let them add a
1607     //<TD> object?
1608     HTMLTagClass::add_reference( $content );
1609     }
1610     }
1611    
1612     /**
1613     * Same ass add()
1614     *
1615     * NOTE: only exists for compatibility with 1.x
1616     *
1617     * @deprecated - use add()
1618     */
1619     function push() {
1620     $args = func_get_args();
1621     call_user_func_array( array(&$this, "add"), $args);
1622     }
1623    
1624     /**
1625     * Same ass add_reference()
1626     *
1627     * NOTE: only exists for compatibility with 1.x
1628     *
1629     * @deprecated - use add()
1630     */
1631     function push_reference( &$content ) {
1632     $this->add_reference( $content );
1633    
1634     }
1635    
1636     } // TRtag
1637    
1638     /**
1639     * <TT> tag class
1640 jonen 1.2 * @package phpHtmlLib
1641 jonen 1.1 */
1642     class TTtag extends HTMLTagClass {
1643     var $_tag = "tt";
1644     } // TTtag
1645    
1646     /**
1647     * <U> tag class
1648 jonen 1.2 * @package phpHtmlLib
1649 jonen 1.1 */
1650     class Utag extends HTMLTagClass {
1651     var $_tag = "u";
1652     } // Utag
1653    
1654    
1655     /**
1656     * <UL> tag class
1657 jonen 1.2 * @package phpHtmlLib
1658 jonen 1.1 */
1659     class ULtag extends OLtag {
1660     var $_tag = "ul";
1661     } // ULtag
1662    
1663     /**
1664     * <VAR> tag class
1665 jonen 1.2 * @package phpHtmlLib
1666 jonen 1.1 */
1667     class VARtag extends HTMLTagClass {
1668     var $_tag = "var";
1669     } // VARtag
1670    
1671    
1672     /**
1673     * <XMP> tag class
1674 jonen 1.2 * @package phpHtmlLib
1675 jonen 1.1 */
1676     class XMPtag extends HTMLTagClass {
1677     var $_tag = "xmp";
1678     } // XMPtag
1679    
1680     ?>

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