| @@ 196-213 (lines=18) @@ | ||
| 193 | * |
|
| 194 | * @return string The tag as a string |
|
| 195 | */ |
|
| 196 | protected function createOpenTag($tagName, $attribs = array(), $selfClose = false) |
|
| 197 | { |
|
| 198 | $tag = '<'.$tagName; |
|
| 199 | $attribNames = array_keys($attribs); |
|
| 200 | foreach($attribNames as $attribName) |
|
| 201 | { |
|
| 202 | $tag .= ' '.$attribName; |
|
| 203 | if($attribs[$attribName]) |
|
| 204 | { |
|
| 205 | $tag .= '="'.$attribs[$attribName].'"'; |
|
| 206 | } |
|
| 207 | } |
|
| 208 | if($selfClose) |
|
| 209 | { |
|
| 210 | return $tag.'/>'; |
|
| 211 | } |
|
| 212 | return $tag.'>'; |
|
| 213 | } |
|
| 214 | ||
| 215 | /** |
|
| 216 | * Create a close tag to be added to the document |
|
| @@ 53-70 (lines=18) @@ | ||
| 50 | * |
|
| 51 | * @return string The tag as a string |
|
| 52 | */ |
|
| 53 | protected function createOpenTag($tagName, $attribs = array(), $selfClose = false) |
|
| 54 | { |
|
| 55 | $tag = '<'.$tagName; |
|
| 56 | $attribNames = array_keys($attribs); |
|
| 57 | foreach($attribNames as $attribName) |
|
| 58 | { |
|
| 59 | $tag .= ' '.$attribName; |
|
| 60 | if($attribs[$attribName]) |
|
| 61 | { |
|
| 62 | $tag .= '="'.$attribs[$attribName].'"'; |
|
| 63 | } |
|
| 64 | } |
|
| 65 | if($selfClose) |
|
| 66 | { |
|
| 67 | return $tag.'/>'; |
|
| 68 | } |
|
| 69 | return $tag.'>'; |
|
| 70 | } |
|
| 71 | ||
| 72 | /** |
|
| 73 | * Create a close tag to be added to the document |
|