1 | <?php |
||
20 | abstract class Html |
||
21 | { |
||
22 | /** |
||
23 | * Returns a HTML tag |
||
24 | * |
||
25 | * @param string $name Name of the tag to render. (Eg, img, form, a...) |
||
26 | * @param array $attributes Any attributes to apply to the tag to render |
||
27 | * @param null|string $content If not set to null will create a tag of the form "<name<content</name<". Otherwise will render as a single tag. |
||
28 | * |
||
29 | * @return string |
||
30 | */ |
||
31 | public static function tag($name, $attributes = array(), $content = null) |
||
56 | |||
57 | /** |
||
58 | * Produces a string of html tag attributes from an array |
||
59 | * |
||
60 | * array('name' => 'test', 'foo' => 'bar') |
||
61 | * becomes: |
||
62 | * 'name="test" foo="bar"' |
||
63 | * |
||
64 | * @param array $attributes |
||
65 | * |
||
66 | * @return string |
||
67 | */ |
||
68 | public static function arrayToAttributes(array $attributes) |
||
91 | } |
||
92 |