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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Thu Jan 30 03:29:41 2003 UTC (21 years, 6 months ago) by jonen
Branch: MAIN
Branch point for: no_vendor_tag
Initial revision

1 jonen 1.1 <?php
2     /**
3     * This file contains all of the default
4     * support wml tags by phpHtmlLib.
5     *
6     * This file only defines the WML tags that are
7     * not part of the HTML/XHTML tag sets. There are
8     * several 'WML' tags that are identical to HTML tags
9     * such as <a>, <head>, <select>, etc etc.
10     *
11     * $Id: WMLTAGS.inc,v 1.4 2002/11/05 23:07:38 hemna Exp $
12     *
13     * @author Walter A. Boring IV <waboring@buildabetterweb.com>
14     * @package phpHtmlLib
15     *
16     */
17    
18     /**
19     * Base class for all WML Tag classes.
20     * WML tags are just XML tags. Since we
21     * have a defined set of WML tags, we have
22     * no need for the XMLTagClass' constructor
23     * param for name. This class also provides
24     * nice methods for setting the class attribute
25     * and the id attribute.
26     *
27     * @author Walter A. Boring IV <waboring@buildabetterweb.com>
28     * @package phpHtmlLib
29     * @link http://phphtmllib.newsblob.com
30     * @link http://www.wapforum.org/what/technical.htm
31     */
32     class WMLTagClass extends XMLTagClass {
33    
34     function WMLTagClass( $attributes=array() ) {
35     $this->set_tag_attributes( $attributes );
36     $num_args = func_num_args();
37     for ($i=1;$i<$num_args;$i++) {
38     $this->add(func_get_arg($i));
39     }
40     }
41    
42     /**
43     * This function is a shorthand helper
44     * to setting the class attribute on a
45     * tag.
46     *
47     * @param string - the class value.
48     */
49     function set_class( $value ) {
50     $this->set_tag_attribute("class", $value);
51     }
52    
53     /**
54     * This function is a shorthand helper
55     * to setting the id attribute on a
56     * tag.
57     *
58     * @param string - the class value.
59     */
60     function set_id( $value ) {
61     $this->set_tag_attribute("id", $value);
62     }
63     }
64    
65    
66     /**
67     * <ACCESS> tag class
68     */
69     class ACCESStag extends WMLTagClass {
70     var $_tag = "access";
71     var $_close_tag_required = FALSE;
72     var $_content_required = FALSE;
73     } // ACCESStag
74    
75     /**
76     * <ANCHOR> tag class
77     *
78     */
79     class ANCHORtag extends WMLTagClass {
80     var $_tag = "anchor";
81     } // ANCHORtag
82    
83    
84     /**
85     * <CARD> tag class
86     *
87     */
88     class CARDtag extends WMLTagClass {
89     var $_tag = "card";
90     } // CARDtag
91    
92    
93     /**
94     * <DO> tag class
95     *
96     */
97     class DOtag extends WMLTagClass {
98     var $_tag = "do";
99     } // DOtag
100    
101    
102     /**
103     * <GO> tag class
104     *
105     */
106     class GOtag extends WMLTagClass {
107     var $_tag = "go";
108    
109     /**
110     * we override this method
111     * to automatically check to
112     * see if the tag has content.
113     * if it doesn't then we
114     * don't need to render the
115     * close tag.
116     */
117     function _prepare_flags() {
118     if ($this->count_content() == 0) {
119     $this->_content_required = FALSE;
120     $this->_close_tag_required = FALSE;
121     }
122     }
123    
124     } // GOtag
125    
126    
127     /**
128     * <NOOP> tag class
129     *
130     */
131     class NOOPtag extends WMLTagClass {
132     var $_tag = "noop";
133     var $_close_tag_required = FALSE;
134     var $_content_required = FALSE;
135     } // NOOPtag
136    
137     /**
138     * <ONEVENT> tag class
139     *
140     */
141     class ONEVENTtag extends WMLTagClass {
142     var $_tag = "onevent";
143     } // ONEVENTtag
144    
145     /**
146     * <POSTFIELD> tag class
147     *
148     */
149     class POSTFIELDtag extends WMLTagClass {
150     var $_tag = "postfield";
151     } // POSTFIELDtag
152    
153     /**
154     * <PREV> tag class
155     *
156     */
157     class PREVtag extends GOtag {
158     var $_tag = "prev";
159     } // PREVtag
160    
161     /**
162     * <REFRESH> tag class
163     *
164     */
165     class REFRESHtag extends WMLTagClass {
166     var $_tag = "refresh";
167     } // REFRESHtag
168    
169     /**
170     * <SETVAR> tag class
171     *
172     */
173     class SETVARtag extends WMLTagClass {
174     var $_tag = "setvar";
175     } // SETVARtag
176    
177    
178    
179     /**
180     * <TEMPLATE> tag class
181     *
182     */
183     class TEMPLATEtag extends WMLTagClass {
184     var $_tag = "template";
185     } // TEMPLATEtag
186    
187     /**
188     * <TIMER> tag class
189     *
190     */
191     class TIMERtag extends WMLTagClass {
192     var $_tag = "timer";
193     var $_close_tag_required = FALSE;
194     var $_content_required = FALSE;
195     } // TIMERtag
196    
197    
198     /**
199     * <WML> tag class
200     * The root tag for all
201     * WML documents
202     *
203     */
204     class WMLtag extends WMLTagClass {
205     var $_tag = "wml";
206     } // WMLtag
207    
208     ?>

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