@@ -1,253 +1,253 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | /** |
4 | - * HTML generator |
|
5 | - * Marker, hommage to Christian François Bouche-Villeneuve aka Chris Marker |
|
6 | - * |
|
7 | - * show off @method |
|
8 | - * |
|
9 | - * @method string abbr(string $content, array $attr) |
|
10 | - * creates an abbreviation or an acronym |
|
11 | - * @method string acronym(string $content, array $attr) |
|
12 | - * creates an acronym (not supported in HTML5. use abbr() instead) |
|
13 | - * @method string address(string $content, array $attr) |
|
14 | - * creates contact information for the author/owner of a document |
|
15 | - * @method string applet(string $content, array $attr) |
|
16 | - * creates an embedded applet |
|
17 | - * (not supported in HTML5. use embed() or <object> instead) |
|
18 | - * @method string area(string $content, array $attr) |
|
19 | - * creates an area inside an image map |
|
20 | - * @method string article(string $content, array $attr) |
|
21 | - * creates an article |
|
22 | - * @method string aside(string $content, array $attr) |
|
23 | - * creates content aside from the page content |
|
24 | - * @method string audio(string $content, array $attr) |
|
25 | - * creates embedded sound content |
|
26 | - * @method string b(string $content, array $attr) |
|
27 | - * creates bold text |
|
28 | - * @method string base(string $content, array $attr) |
|
29 | - * creates an element that specifies the base url/target for all relative urls in a document |
|
30 | - * @method string basefont(string $content, array $attr) |
|
31 | - * creates an element that specifies a default color, size, and font for all text in a document |
|
32 | - * (not supported in HTML5. use CSS instead) |
|
33 | - * @method string bdi(string $content, array $attr) |
|
34 | - * creates an element that isolates a part of text that might be formatted |
|
35 | - * in a different direction from other text outside it |
|
36 | - * @method string bdo(string $content, array $attr) |
|
37 | - * creates an element that overrides the current text direction |
|
38 | - * @method string big(string $content, array $attr) |
|
39 | - * creates an element that defines big text (not supported in HTML5. use CSS instead) |
|
40 | - * @method string blockquote(string $content, array $attr) |
|
41 | - * creates a section that is quoted from another source |
|
42 | - * @method string body(string $content, array $attr) |
|
43 | - * creates the document's body |
|
44 | - * @method string br(string $content, array $attr) |
|
45 | - * creates a single line break |
|
46 | - * @method string button(string $content, array $attr) |
|
47 | - * creates a clickable button |
|
48 | - * @method string canvas(string $content, array $attr) |
|
49 | - * used to draw graphics, on the fly, via scripting (usually javascript) |
|
50 | - * @method string caption(string $content, array $attr) |
|
51 | - * creates a table caption |
|
52 | - * @method string center(string $content, array $attr) |
|
53 | - * defines centered text (not supported in HTML5. use CSS instead) |
|
54 | - * @method string cite(string $content, array $attr) |
|
55 | - * creates the title of a work |
|
56 | - * @method string code(string $content, array $attr) |
|
57 | - * creates a piece of computer code |
|
58 | - * @method string col(string $content, array $attr) |
|
59 | - * specifies column properties for each column within a <colgroup> element |
|
60 | - * @method string colgroup(string $content, array $attr) |
|
61 | - * specifies a group of one or more columns in a table for formatting |
|
62 | - * @method string data(string $content, array $attr) |
|
63 | - * adds a machine-readable translation of a given content |
|
64 | - * @method string datalist(string $content, array $attr) |
|
65 | - * specifies a list of pre-defined options for input controls |
|
66 | - * @method string dd(string $content, array $attr) |
|
67 | - * creates a description/value of a term in a description list |
|
68 | - * @method string del(string $content, array $attr) |
|
69 | - * creates text that has been deleted from a document |
|
70 | - * @method string details(string $content, array $attr) |
|
71 | - * creates additional details that the user can view or hide |
|
72 | - * @method string dfn(string $content, array $attr) |
|
73 | - * specifies a term that is going to be defined within the content |
|
74 | - * @method string dialog(string $content, array $attr) |
|
75 | - * creates a dialog box or window |
|
76 | - * @method string dir(string $content, array $attr) |
|
77 | - * defines a directory list (not supported in HTML5. use ul() instead) |
|
78 | - * @method string div(string $content, array $attr) |
|
79 | - * creates a section in a document |
|
80 | - * @method string dl(string $content, array $attr) |
|
81 | - * creates a description list |
|
82 | - * @method string dt(string $content, array $attr) |
|
83 | - * creates a term/name in a description list |
|
84 | - * @method string em(string $content, array $attr) |
|
85 | - * creates emphasized text |
|
86 | - * @method string embed(string $content, array $attr) |
|
87 | - * creates a container for an external application |
|
88 | - * @method string fieldset(string $content, array $attr) |
|
89 | - * groups related elements in a form |
|
90 | - * @method string figcaption(string $content, array $attr) |
|
91 | - * creates a caption for a <figure> element |
|
92 | - * @method string figure(string $content, array $attr) |
|
93 | - * specifies self-contained content |
|
94 | - * @method string font(string $content, array $attr) |
|
95 | - * defines font, color, and size for text (not supported in HTML5. use CSS instead) |
|
96 | - * @method string footer(string $content, array $attr) |
|
97 | - * creates a footer for a document or section |
|
98 | - * @method string form(string $content, array $attr) |
|
99 | - * creates an HTML form for user input |
|
100 | - * @method string frame(string $content, array $attr) |
|
101 | - * defines a window (a frame) in a frameset (not supported in HTML5) |
|
102 | - * @method string frameset(string $content, array $attr) |
|
103 | - * defines a set of frames (not supported in HTML5) |
|
104 | - * @method string h1(string $content, array $attr) |
|
105 | - * creates HTML headings 1 |
|
106 | - * @method string h2(string $content, array $attr) |
|
107 | - * creates HTML headings 2 |
|
108 | - * @method string h3(string $content, array $attr) |
|
109 | - * creates HTML headings 3 |
|
110 | - * @method string h4(string $content, array $attr) |
|
111 | - * creates HTML headings 4 |
|
112 | - * @method string h5(string $content, array $attr) |
|
113 | - * creates HTML headings 5 |
|
114 | - * @method string h6(string $content, array $attr) |
|
115 | - * creates HTML headings 6 |
|
116 | - * @method string head(string $content, array $attr) |
|
117 | - * contains metadata/information for the document |
|
118 | - * @method string header(string $content, array $attr) |
|
119 | - * creates a header for a document or section |
|
120 | - * @method string hr(string $content, array $attr) |
|
121 | - * creates a thematic change in the content |
|
122 | - * @method string html(string $content, array $attr) |
|
123 | - * creates the root of an HTML document |
|
124 | - * @method string i(string $content, array $attr) |
|
125 | - * creates a part of text in an alternate voice or mood |
|
126 | - * @method string iframe(string $content, array $attr) |
|
127 | - * creates an inline frame |
|
128 | - * @method string input(string $content, array $attr) |
|
129 | - * creates an input control |
|
130 | - * @method string ins(string $content, array $attr) |
|
131 | - * creates a text that has been inserted into a document |
|
132 | - * @method string kbd(string $content, array $attr) |
|
133 | - * creates keyboard input |
|
134 | - * @method string label(string $content, array $attr) |
|
135 | - * creates a label for an <input> element |
|
136 | - * @method string legend(string $content, array $attr) |
|
137 | - * creates a caption for a <fieldset> element |
|
138 | - * @method string li(string $content, array $attr) |
|
139 | - * creates a list item |
|
140 | - * @method string link(string $content, array $attr) |
|
141 | - * creates the relationship between a document and an external resource |
|
142 | - * (most used to link to style sheets) |
|
143 | - * @method string main(string $content, array $attr) |
|
144 | - * specifies the main content of a document |
|
145 | - * @method string map(string $content, array $attr) |
|
146 | - * creates an image map |
|
147 | - * @method string mark(string $content, array $attr) |
|
148 | - * creates marked/highlighted text |
|
149 | - * @method string meta(string $content, array $attr) |
|
150 | - * creates metadata about an HTML document |
|
151 | - * @method string meter(string $content, array $attr) |
|
152 | - * creates a scalar measurement within a known range (a gauge) |
|
153 | - * @method string nav(string $content, array $attr) |
|
154 | - * creates navigation links |
|
155 | - * @method string noframes(string $content, array $attr) |
|
156 | - * defines an alternate content for users that do not support frames |
|
157 | - * (not supported in HTML5) |
|
158 | - * @method string noscript(string $content, array $attr) |
|
159 | - * creates an alternate content for users that do not support client-side scripts |
|
160 | - * @method string object(string $content, array $attr) |
|
161 | - * creates a container for an external application |
|
162 | - * @method string ol(string $content, array $attr) |
|
163 | - * creates an ordered list |
|
164 | - * @method string optgroup(string $content, array $attr) |
|
165 | - * creates a group of related options in a drop-down list |
|
166 | - * @method string option(string $content, array $attr) |
|
167 | - * creates an option in a drop-down list |
|
168 | - * @method string output(string $content, array $attr) |
|
169 | - * creates the result of a calculation |
|
170 | - * @method string p(string $content, array $attr) |
|
4 | + * HTML generator |
|
5 | + * Marker, hommage to Christian François Bouche-Villeneuve aka Chris Marker |
|
6 | + * |
|
7 | + * show off @method |
|
8 | + * |
|
9 | + * @method string abbr(string $content, array $attr) |
|
10 | + * creates an abbreviation or an acronym |
|
11 | + * @method string acronym(string $content, array $attr) |
|
12 | + * creates an acronym (not supported in HTML5. use abbr() instead) |
|
13 | + * @method string address(string $content, array $attr) |
|
14 | + * creates contact information for the author/owner of a document |
|
15 | + * @method string applet(string $content, array $attr) |
|
16 | + * creates an embedded applet |
|
17 | + * (not supported in HTML5. use embed() or <object> instead) |
|
18 | + * @method string area(string $content, array $attr) |
|
19 | + * creates an area inside an image map |
|
20 | + * @method string article(string $content, array $attr) |
|
21 | + * creates an article |
|
22 | + * @method string aside(string $content, array $attr) |
|
23 | + * creates content aside from the page content |
|
24 | + * @method string audio(string $content, array $attr) |
|
25 | + * creates embedded sound content |
|
26 | + * @method string b(string $content, array $attr) |
|
27 | + * creates bold text |
|
28 | + * @method string base(string $content, array $attr) |
|
29 | + * creates an element that specifies the base url/target for all relative urls in a document |
|
30 | + * @method string basefont(string $content, array $attr) |
|
31 | + * creates an element that specifies a default color, size, and font for all text in a document |
|
32 | + * (not supported in HTML5. use CSS instead) |
|
33 | + * @method string bdi(string $content, array $attr) |
|
34 | + * creates an element that isolates a part of text that might be formatted |
|
35 | + * in a different direction from other text outside it |
|
36 | + * @method string bdo(string $content, array $attr) |
|
37 | + * creates an element that overrides the current text direction |
|
38 | + * @method string big(string $content, array $attr) |
|
39 | + * creates an element that defines big text (not supported in HTML5. use CSS instead) |
|
40 | + * @method string blockquote(string $content, array $attr) |
|
41 | + * creates a section that is quoted from another source |
|
42 | + * @method string body(string $content, array $attr) |
|
43 | + * creates the document's body |
|
44 | + * @method string br(string $content, array $attr) |
|
45 | + * creates a single line break |
|
46 | + * @method string button(string $content, array $attr) |
|
47 | + * creates a clickable button |
|
48 | + * @method string canvas(string $content, array $attr) |
|
49 | + * used to draw graphics, on the fly, via scripting (usually javascript) |
|
50 | + * @method string caption(string $content, array $attr) |
|
51 | + * creates a table caption |
|
52 | + * @method string center(string $content, array $attr) |
|
53 | + * defines centered text (not supported in HTML5. use CSS instead) |
|
54 | + * @method string cite(string $content, array $attr) |
|
55 | + * creates the title of a work |
|
56 | + * @method string code(string $content, array $attr) |
|
57 | + * creates a piece of computer code |
|
58 | + * @method string col(string $content, array $attr) |
|
59 | + * specifies column properties for each column within a <colgroup> element |
|
60 | + * @method string colgroup(string $content, array $attr) |
|
61 | + * specifies a group of one or more columns in a table for formatting |
|
62 | + * @method string data(string $content, array $attr) |
|
63 | + * adds a machine-readable translation of a given content |
|
64 | + * @method string datalist(string $content, array $attr) |
|
65 | + * specifies a list of pre-defined options for input controls |
|
66 | + * @method string dd(string $content, array $attr) |
|
67 | + * creates a description/value of a term in a description list |
|
68 | + * @method string del(string $content, array $attr) |
|
69 | + * creates text that has been deleted from a document |
|
70 | + * @method string details(string $content, array $attr) |
|
71 | + * creates additional details that the user can view or hide |
|
72 | + * @method string dfn(string $content, array $attr) |
|
73 | + * specifies a term that is going to be defined within the content |
|
74 | + * @method string dialog(string $content, array $attr) |
|
75 | + * creates a dialog box or window |
|
76 | + * @method string dir(string $content, array $attr) |
|
77 | + * defines a directory list (not supported in HTML5. use ul() instead) |
|
78 | + * @method string div(string $content, array $attr) |
|
79 | + * creates a section in a document |
|
80 | + * @method string dl(string $content, array $attr) |
|
81 | + * creates a description list |
|
82 | + * @method string dt(string $content, array $attr) |
|
83 | + * creates a term/name in a description list |
|
84 | + * @method string em(string $content, array $attr) |
|
85 | + * creates emphasized text |
|
86 | + * @method string embed(string $content, array $attr) |
|
87 | + * creates a container for an external application |
|
88 | + * @method string fieldset(string $content, array $attr) |
|
89 | + * groups related elements in a form |
|
90 | + * @method string figcaption(string $content, array $attr) |
|
91 | + * creates a caption for a <figure> element |
|
92 | + * @method string figure(string $content, array $attr) |
|
93 | + * specifies self-contained content |
|
94 | + * @method string font(string $content, array $attr) |
|
95 | + * defines font, color, and size for text (not supported in HTML5. use CSS instead) |
|
96 | + * @method string footer(string $content, array $attr) |
|
97 | + * creates a footer for a document or section |
|
98 | + * @method string form(string $content, array $attr) |
|
99 | + * creates an HTML form for user input |
|
100 | + * @method string frame(string $content, array $attr) |
|
101 | + * defines a window (a frame) in a frameset (not supported in HTML5) |
|
102 | + * @method string frameset(string $content, array $attr) |
|
103 | + * defines a set of frames (not supported in HTML5) |
|
104 | + * @method string h1(string $content, array $attr) |
|
105 | + * creates HTML headings 1 |
|
106 | + * @method string h2(string $content, array $attr) |
|
107 | + * creates HTML headings 2 |
|
108 | + * @method string h3(string $content, array $attr) |
|
109 | + * creates HTML headings 3 |
|
110 | + * @method string h4(string $content, array $attr) |
|
111 | + * creates HTML headings 4 |
|
112 | + * @method string h5(string $content, array $attr) |
|
113 | + * creates HTML headings 5 |
|
114 | + * @method string h6(string $content, array $attr) |
|
115 | + * creates HTML headings 6 |
|
116 | + * @method string head(string $content, array $attr) |
|
117 | + * contains metadata/information for the document |
|
118 | + * @method string header(string $content, array $attr) |
|
119 | + * creates a header for a document or section |
|
120 | + * @method string hr(string $content, array $attr) |
|
121 | + * creates a thematic change in the content |
|
122 | + * @method string html(string $content, array $attr) |
|
123 | + * creates the root of an HTML document |
|
124 | + * @method string i(string $content, array $attr) |
|
125 | + * creates a part of text in an alternate voice or mood |
|
126 | + * @method string iframe(string $content, array $attr) |
|
127 | + * creates an inline frame |
|
128 | + * @method string input(string $content, array $attr) |
|
129 | + * creates an input control |
|
130 | + * @method string ins(string $content, array $attr) |
|
131 | + * creates a text that has been inserted into a document |
|
132 | + * @method string kbd(string $content, array $attr) |
|
133 | + * creates keyboard input |
|
134 | + * @method string label(string $content, array $attr) |
|
135 | + * creates a label for an <input> element |
|
136 | + * @method string legend(string $content, array $attr) |
|
137 | + * creates a caption for a <fieldset> element |
|
138 | + * @method string li(string $content, array $attr) |
|
139 | + * creates a list item |
|
140 | + * @method string link(string $content, array $attr) |
|
141 | + * creates the relationship between a document and an external resource |
|
142 | + * (most used to link to style sheets) |
|
143 | + * @method string main(string $content, array $attr) |
|
144 | + * specifies the main content of a document |
|
145 | + * @method string map(string $content, array $attr) |
|
146 | + * creates an image map |
|
147 | + * @method string mark(string $content, array $attr) |
|
148 | + * creates marked/highlighted text |
|
149 | + * @method string meta(string $content, array $attr) |
|
150 | + * creates metadata about an HTML document |
|
151 | + * @method string meter(string $content, array $attr) |
|
152 | + * creates a scalar measurement within a known range (a gauge) |
|
153 | + * @method string nav(string $content, array $attr) |
|
154 | + * creates navigation links |
|
155 | + * @method string noframes(string $content, array $attr) |
|
156 | + * defines an alternate content for users that do not support frames |
|
157 | + * (not supported in HTML5) |
|
158 | + * @method string noscript(string $content, array $attr) |
|
159 | + * creates an alternate content for users that do not support client-side scripts |
|
160 | + * @method string object(string $content, array $attr) |
|
161 | + * creates a container for an external application |
|
162 | + * @method string ol(string $content, array $attr) |
|
163 | + * creates an ordered list |
|
164 | + * @method string optgroup(string $content, array $attr) |
|
165 | + * creates a group of related options in a drop-down list |
|
166 | + * @method string option(string $content, array $attr) |
|
167 | + * creates an option in a drop-down list |
|
168 | + * @method string output(string $content, array $attr) |
|
169 | + * creates the result of a calculation |
|
170 | + * @method string p(string $content, array $attr) |
|
171 | 171 | * creates a paragraph |
172 | - * @method string param(string $content, array $attr) |
|
172 | + * @method string param(string $content, array $attr) |
|
173 | 173 | * creates a parameter for an object |
174 | - * @method string picture(string $content, array $attr) |
|
174 | + * @method string picture(string $content, array $attr) |
|
175 | 175 | * creates a container for multiple image resources |
176 | - * @method string pre(string $content, array $attr) |
|
176 | + * @method string pre(string $content, array $attr) |
|
177 | 177 | * creates preformatted text |
178 | - * @method string progress(string $content, array $attr) represents the progress of a task |
|
179 | - * @method string q(string $content, array $attr) |
|
178 | + * @method string progress(string $content, array $attr) represents the progress of a task |
|
179 | + * @method string q(string $content, array $attr) |
|
180 | 180 | * creates a short quotation |
181 | - * @method string rp(string $content, array $attr) |
|
181 | + * @method string rp(string $content, array $attr) |
|
182 | 182 | * creates what to show in browsers that do not support ruby annotations |
183 | - * @method string rt(string $content, array $attr) |
|
183 | + * @method string rt(string $content, array $attr) |
|
184 | 184 | * creates an explanation/pronunciation of characters (for east asian typography) |
185 | - * @method string ruby(string $content, array $attr) |
|
185 | + * @method string ruby(string $content, array $attr) |
|
186 | 186 | * creates a ruby annotation (for east asian typography) |
187 | - * @method string s(string $content, array $attr) |
|
187 | + * @method string s(string $content, array $attr) |
|
188 | 188 | * creates text that is no longer correct |
189 | - * @method string samp(string $content, array $attr) |
|
189 | + * @method string samp(string $content, array $attr) |
|
190 | 190 | * creates sample output from a computer program |
191 | - * @method string script(string $content, array $attr) |
|
191 | + * @method string script(string $content, array $attr) |
|
192 | 192 | * creates a client-side script |
193 | - * @method string section(string $content, array $attr) |
|
193 | + * @method string section(string $content, array $attr) |
|
194 | 194 | * creates a section in a document |
195 | - * @method string select(string $content, array $attr) |
|
195 | + * @method string select(string $content, array $attr) |
|
196 | 196 | * creates a drop-down list |
197 | - * @method string small(string $content, array $attr) |
|
197 | + * @method string small(string $content, array $attr) |
|
198 | 198 | * creates smaller text |
199 | - * @method string source(string $content, array $attr) |
|
199 | + * @method string source(string $content, array $attr) |
|
200 | 200 | * creates multiple media resources for media elements (<video> and <audio>) |
201 | - * @method string span(string $content, array $attr) |
|
201 | + * @method string span(string $content, array $attr) |
|
202 | 202 | * creates a section in a document |
203 | - * @method string strike(string $content, array $attr) defines strikethrough text |
|
204 | - * (not supported in HTML5. use del() or s() instead) |
|
205 | - * @method string strong(string $content, array $attr) |
|
203 | + * @method string strike(string $content, array $attr) defines strikethrough text |
|
204 | + * (not supported in HTML5. use del() or s() instead) |
|
205 | + * @method string strong(string $content, array $attr) |
|
206 | 206 | * creates important text |
207 | - * @method string style(string $content, array $attr) |
|
207 | + * @method string style(string $content, array $attr) |
|
208 | 208 | * creates style information for a document |
209 | - * @method string sub(string $content, array $attr) |
|
209 | + * @method string sub(string $content, array $attr) |
|
210 | 210 | * creates subscripted text |
211 | - * @method string summary(string $content, array $attr) |
|
211 | + * @method string summary(string $content, array $attr) |
|
212 | 212 | * creates a visible heading for a <details> element |
213 | - * @method string sup(string $content, array $attr) |
|
213 | + * @method string sup(string $content, array $attr) |
|
214 | 214 | * creates superscripted text |
215 | - * @method string svg(string $content, array $attr) |
|
215 | + * @method string svg(string $content, array $attr) |
|
216 | 216 | * creates a container for svg graphics |
217 | - * @method string table(string $content, array $attr) |
|
217 | + * @method string table(string $content, array $attr) |
|
218 | 218 | * creates a table |
219 | - * @method string tbody(string $content, array $attr) groups the body content in a table |
|
220 | - * @method string td(string $content, array $attr) |
|
219 | + * @method string tbody(string $content, array $attr) groups the body content in a table |
|
220 | + * @method string td(string $content, array $attr) |
|
221 | 221 | * creates a cell in a table |
222 | - * @method string template(string $content, array $attr) |
|
222 | + * @method string template(string $content, array $attr) |
|
223 | 223 | * creates a container for content that should be hidden when the page loads |
224 | - * @method string textarea(string $content, array $attr) |
|
224 | + * @method string textarea(string $content, array $attr) |
|
225 | 225 | * creates a multiline input control (text area) |
226 | - * @method string tfoot(string $content, array $attr) groups the footer content in a table |
|
227 | - * @method string th(string $content, array $attr) |
|
226 | + * @method string tfoot(string $content, array $attr) groups the footer content in a table |
|
227 | + * @method string th(string $content, array $attr) |
|
228 | 228 | * creates a header cell in a table |
229 | - * @method string thead(string $content, array $attr) groups the header content in a table |
|
230 | - * @method string time(string $content, array $attr) |
|
229 | + * @method string thead(string $content, array $attr) groups the header content in a table |
|
230 | + * @method string time(string $content, array $attr) |
|
231 | 231 | * creates a specific time (or datetime) |
232 | - * @method string title(string $content, array $attr) |
|
232 | + * @method string title(string $content, array $attr) |
|
233 | 233 | * creates a title for the document |
234 | - * @method string tr(string $content, array $attr) |
|
234 | + * @method string tr(string $content, array $attr) |
|
235 | 235 | * creates a row in a table |
236 | - * @method string track(string $content, array $attr) |
|
236 | + * @method string track(string $content, array $attr) |
|
237 | 237 | * creates text tracks for media elements (<video> and <audio>) |
238 | - * @method string tt(string $content, array $attr) |
|
238 | + * @method string tt(string $content, array $attr) |
|
239 | 239 | * creates an element that defines teletype text (not supported in HTML5. use CSS instead) |
240 | - * @method string u(string $content, array $attr) |
|
240 | + * @method string u(string $content, array $attr) |
|
241 | 241 | * creates some text that is unarticulated and styled differently from normal text |
242 | - * @method string ul(string $content, array $attr) |
|
242 | + * @method string ul(string $content, array $attr) |
|
243 | 243 | * creates an unordered list |
244 | - * @method string var(string $content, array $attr) |
|
244 | + * @method string var(string $content, array $attr) |
|
245 | 245 | * creates a variable |
246 | - * @method string video(string $content, array $attr) |
|
246 | + * @method string video(string $content, array $attr) |
|
247 | 247 | * creates embedded video content |
248 | - * @method string wbr(string $content, array $attr) |
|
248 | + * @method string wbr(string $content, array $attr) |
|
249 | 249 | * creates a possible line-break |
250 | - */ |
|
250 | + */ |
|
251 | 251 | |
252 | 252 | namespace HexMakina\Marker; |
253 | 253 |
@@ -3,11 +3,11 @@ |
||
3 | 3 | namespace HexMakina\Marker; |
4 | 4 | |
5 | 5 | /** |
6 | - * @method static string hidden(string $name, $value=null) |
|
7 | - * @method static string date() |
|
8 | - * @method static string time() |
|
9 | - * @method static string datetime() |
|
10 | - */ |
|
6 | + * @method static string hidden(string $name, $value=null) |
|
7 | + * @method static string date() |
|
8 | + * @method static string time() |
|
9 | + * @method static string datetime() |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | class Form |
13 | 13 | { |
@@ -17,10 +17,10 @@ discard block |
||
17 | 17 | { |
18 | 18 | // arguments [name, value, [attributes], [errors]] |
19 | 19 | $i = 0; |
20 | - $field_name = $arguments[$i++] ?? null; |
|
20 | + $field_name = $arguments[$i++] ?? null; |
|
21 | 21 | $field_value = $arguments[$i++] ?? null; |
22 | - $attributes = (array)($arguments[$i++] ?? []); |
|
23 | - $errors = (array)($arguments[$i++] ?? []); |
|
22 | + $attributes = (array)($arguments[$i++] ?? []); |
|
23 | + $errors = (array)($arguments[$i++] ?? []); |
|
24 | 24 | |
25 | 25 | $attributes['type'] = $element_type; |
26 | 26 | $attributes['name'] = $attributes['name'] ?? $field_name; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | foreach ($option_list as $value => $label) { |
69 | 69 | $option_attributes = ['value' => $value]; |
70 | 70 | if ($selected == $value) { |
71 | - $option_attributes['selected'] = 'selected'; |
|
71 | + $option_attributes['selected'] = 'selected'; |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | $options .= new Element('option', $label, $option_attributes); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | public static function legend(string $label, array $attributes = []): string |
80 | 80 | { |
81 | - return '' . (new Element('legend', $label, $attributes)); |
|
81 | + return ''.(new Element('legend', $label, $attributes)); |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | public static function label(string $field_for, string $field_label, array $attributes = [], array $errors = []): string |
@@ -128,6 +128,6 @@ discard block |
||
128 | 128 | unset($attributes['label']); |
129 | 129 | } |
130 | 130 | |
131 | - return $label . (new Element($tag, $content, $attributes)); |
|
131 | + return $label.(new Element($tag, $content, $attributes)); |
|
132 | 132 | } |
133 | 133 | } |
@@ -24,10 +24,10 @@ discard block |
||
24 | 24 | |
25 | 25 | public function testCreateEmptyElement(): void |
26 | 26 | { |
27 | - foreach($this->tags as $tag) |
|
27 | + foreach ($this->tags as $tag) |
|
28 | 28 | { |
29 | 29 | $e = new Element($tag); |
30 | - if(in_array($tag, Element::VOID_ELEMENTS)){ |
|
30 | + if (in_array($tag, Element::VOID_ELEMENTS)) { |
|
31 | 31 | $this->assertEquals('<'.$tag.'/>', $e->__toString()); |
32 | 32 | } |
33 | 33 | else { |
@@ -40,12 +40,12 @@ discard block |
||
40 | 40 | public function testCreateElementWithContent(): void |
41 | 41 | { |
42 | 42 | $messages = ['lorem ipsum' => 'lorem ipsum', '' => '', null => '']; |
43 | - foreach($messages as $message => $expected){ |
|
44 | - foreach($this->tags as $tag) |
|
43 | + foreach ($messages as $message => $expected) { |
|
44 | + foreach ($this->tags as $tag) |
|
45 | 45 | { |
46 | 46 | $e = new Element($tag, $message); |
47 | 47 | |
48 | - if(in_array($tag, Element::VOID_ELEMENTS)){ |
|
48 | + if (in_array($tag, Element::VOID_ELEMENTS)) { |
|
49 | 49 | $this->assertEquals('<'.$tag.'/>', $e->__toString()); |
50 | 50 | } |
51 | 51 | else { |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $this->assertForAllHTMLTags($message, $attributes, $attributes_expected_string); |
97 | 97 | |
98 | 98 | |
99 | - $attributes = ['class' => 'test_class', 'style="color:red;"','id' => 'test_id']; |
|
99 | + $attributes = ['class' => 'test_class', 'style="color:red;"', 'id' => 'test_id']; |
|
100 | 100 | $attributes_expected_string = ' class="test_class" style="color:red;" id="test_id"'; |
101 | 101 | |
102 | 102 | // testing attributes string generator |
@@ -109,11 +109,11 @@ discard block |
||
109 | 109 | |
110 | 110 | private function assertForAllHTMLTags($message, $attributes, $attributes_expected_string) |
111 | 111 | { |
112 | - foreach($this->tags as $tag){ |
|
112 | + foreach ($this->tags as $tag) { |
|
113 | 113 | |
114 | 114 | // testing by instantiation |
115 | - $e = new Element($tag, $message, $attributes); |
|
116 | - if(in_array($tag, Element::VOID_ELEMENTS)){ |
|
115 | + $e = new Element($tag, $message, $attributes); |
|
116 | + if (in_array($tag, Element::VOID_ELEMENTS)) { |
|
117 | 117 | $this->assertEquals(sprintf(Element::FORMAT_VOID, $tag, $attributes_expected_string), $e->__toString()); |
118 | 118 | } |
119 | 119 | else { |
@@ -29,8 +29,7 @@ discard block |
||
29 | 29 | $e = new Element($tag); |
30 | 30 | if(in_array($tag, Element::VOID_ELEMENTS)){ |
31 | 31 | $this->assertEquals('<'.$tag.'/>', $e->__toString()); |
32 | - } |
|
33 | - else { |
|
32 | + } else { |
|
34 | 33 | $this->assertEquals("<$tag></$tag>", $e->__toString()); |
35 | 34 | } |
36 | 35 | } |
@@ -47,8 +46,7 @@ discard block |
||
47 | 46 | |
48 | 47 | if(in_array($tag, Element::VOID_ELEMENTS)){ |
49 | 48 | $this->assertEquals('<'.$tag.'/>', $e->__toString()); |
50 | - } |
|
51 | - else { |
|
49 | + } else { |
|
52 | 50 | $this->assertEquals("<$tag>$expected</$tag>", $e->__toString()); |
53 | 51 | } |
54 | 52 | } |
@@ -115,8 +113,7 @@ discard block |
||
115 | 113 | $e = new Element($tag, $message, $attributes); |
116 | 114 | if(in_array($tag, Element::VOID_ELEMENTS)){ |
117 | 115 | $this->assertEquals(sprintf(Element::FORMAT_VOID, $tag, $attributes_expected_string), $e->__toString()); |
118 | - } |
|
119 | - else { |
|
116 | + } else { |
|
120 | 117 | $this->assertEquals(sprintf(Element::FORMAT_ELEMENT, $tag, $attributes_expected_string, $message, $tag), $e->__toString()); |
121 | 118 | } |
122 | 119 | } |