1 | <?php |
||
22 | 2 | class html extends xml |
|
23 | 1 | { |
|
24 | 2 | /** |
|
25 | * @var html\Writer The writer instance to use by default |
||
26 | */ |
||
27 | 3 | public static $writer=null; |
|
28 | |||
29 | 3 | public static function __callStatic( $name, $args ) |
|
36 | |||
37 | /** |
||
38 | * This parses an HTML string and returns a Proxy |
||
39 | * @param string|Proxy $html |
||
40 | * @param string $encoding |
||
41 | * @return Proxy |
||
42 | * @throws \arc\Exception |
||
43 | */ |
||
44 | public static function parse( $html=null, $encoding = null ) |
||
49 | |||
50 | /** |
||
51 | * Returns a guaranteed valid HTML attribute value. Removes illegal characters. |
||
52 | * @param string|array|bool $value |
||
53 | * @return string |
||
54 | */ |
||
55 | static public function value( $value ) |
||
69 | |||
70 | /** |
||
71 | * Returns a guaranteed valid HTML attribute. Removes illegal characters. |
||
72 | * Allows for 'naked' attributes, without a value. |
||
73 | * @param string $name |
||
74 | * @param string|array|bool $value |
||
75 | * @return string |
||
76 | */ |
||
77 | static public function attribute( $name, $value ) |
||
87 | |||
88 | /** |
||
89 | * Returns a HTML doctype string |
||
90 | * @param string $version The doctype version to use, available are: 'html5', 'html4' (strict), 'transitional' (html4) and 'xhtml' |
||
91 | * @retun string |
||
92 | */ |
||
93 | static public function doctype( $version='html5' ) |
||
104 | |||
105 | } |
||
106 |