PageRenderTime 26ms CodeModel.GetById 2ms app.highlight 17ms RepoModel.GetById 1ms app.codeStats 0ms

/www/.metadata/.plugins/org.eclipse.php.core/__language__/ea1b290a/tidy.php

http://iprn.googlecode.com/
PHP | 585 lines | 190 code | 58 blank | 337 comment | 0 complexity | a605cfac20c4ec8361a4c005886cb884 MD5 | raw file
  1<?php
  2
  3// Start of tidy v.2.0
  4
  5class tidy  {
  6
  7	/**
  8	 * Returns the value of the specified configuration option for the tidy document
  9	 * @link http://www.php.net/manual/en/tidy.getopt.php
 10	 * @param option string <p>
 11	 * You will find a list with each configuration option and their types
 12	 * at: &url.tidy.conf;.
 13	 * </p>
 14	 * @return mixed the value of the specified option.
 15	 * The return type depends on the type of the specified one.
 16	 */
 17	public function getOpt ($option) {}
 18
 19	/**
 20	 * Execute configured cleanup and repair operations on parsed markup
 21	 * @link http://www.php.net/manual/en/tidy.cleanrepair.php
 22	 * @return bool Returns true on success or false on failure.
 23	 */
 24	public function cleanRepair () {}
 25
 26	/**
 27	 * Parse markup in file or URI
 28	 * @link http://www.php.net/manual/en/tidy.parsefile.php
 29	 * @param filename string <p>
 30	 * If the filename parameter is given, this function
 31	 * will also read that file and initialize the object with the file,
 32	 * acting like tidy_parse_file.
 33	 * </p>
 34	 * @param config mixed[optional] <p>
 35	 * The config config can be passed either as an
 36	 * array or as a string. If a string is passed, it is interpreted as the
 37	 * name of the configuration file, otherwise, it is interpreted as the
 38	 * options themselves.
 39	 * </p>
 40	 * <p>
 41	 * For an explanation about each option, see
 42	 * &url.tidy.conf;.
 43	 * </p>
 44	 * @param encoding string[optional] <p>
 45	 * The encoding parameter sets the encoding for
 46	 * input/output documents. The possible values for encoding are: 
 47	 * ascii, latin0, latin1,
 48	 * raw, utf8, iso2022,
 49	 * mac, win1252, ibm858,
 50	 * utf16, utf16le, utf16be,
 51	 * big5, and shiftjis.
 52	 * </p>
 53	 * @param use_include_path bool[optional] <p>
 54	 * Search for the file in the include_path.
 55	 * </p>
 56	 * @return bool Returns true on success or false on failure.
 57	 */
 58	public function parseFile ($filename, $config = null, $encoding = null, $use_include_path = null) {}
 59
 60	/**
 61	 * Parse a document stored in a string
 62	 * @link http://www.php.net/manual/en/tidy.parsestring.php
 63	 * @param input string <p>
 64	 * The data to be parsed.
 65	 * </p>
 66	 * @param config mixed[optional] <p>
 67	 * The config config can be passed either as an
 68	 * array or as a string. If a string is passed, it is interpreted as the
 69	 * name of the configuration file, otherwise, it is interpreted as the
 70	 * options themselves.
 71	 * </p>
 72	 * <p>
 73	 * For an explanation about each option, visit &url.tidy.conf;.
 74	 * </p>
 75	 * @param encoding string[optional] <p>
 76	 * The encoding parameter sets the encoding for
 77	 * input/output documents. The possible values for encoding are: 
 78	 * ascii, latin0, latin1,
 79	 * raw, utf8, iso2022,
 80	 * mac, win1252, ibm858,
 81	 * utf16, utf16le, utf16be,
 82	 * big5, and shiftjis.
 83	 * </p>
 84	 * @return bool a new tidy instance.
 85	 */
 86	public function parseString ($input, $config = null, $encoding = null) {}
 87
 88	/**
 89	 * Repair a string using an optionally provided configuration file
 90	 * @link http://www.php.net/manual/en/tidy.repairstring.php
 91	 * @param data string <p>
 92	 * The data to be repaired.
 93	 * </p>
 94	 * @param config mixed[optional] <p>
 95	 * The config config can be passed either as an
 96	 * array or as a string. If a string is passed, it is interpreted as the
 97	 * name of the configuration file, otherwise, it is interpreted as the
 98	 * options themselves.
 99	 * </p>
100	 * <p>
101	 * Check &url.tidy.conf; for
102	 * an explanation about each option.
103	 * </p>
104	 * @param encoding string[optional] <p>
105	 * The encoding parameter sets the encoding for
106	 * input/output documents. The possible values for encoding are: 
107	 * ascii, latin0, latin1,
108	 * raw, utf8, iso2022,
109	 * mac, win1252, ibm858,
110	 * utf16, utf16le, utf16be,
111	 * big5, and shiftjis.
112	 * </p>
113	 * @return string the repaired string.
114	 */
115	public function repairString ($data, $config = null, $encoding = null) {}
116
117	/**
118	 * Repair a file and return it as a string
119	 * @link http://www.php.net/manual/en/tidy.repairfile.php
120	 * @param filename string <p>
121	 * The file to be repaired.
122	 * </p>
123	 * @param config mixed[optional] <p>
124	 * The config config can be passed either as an
125	 * array or as a string. If a string is passed, it is interpreted as the
126	 * name of the configuration file, otherwise, it is interpreted as the
127	 * options themselves.
128	 * </p>
129	 * <p>
130	 * Check http://tidy.sourceforge.net/docs/quickref.html for an
131	 * explanation about each option.
132	 * </p>
133	 * @param encoding string[optional] <p>
134	 * The encoding parameter sets the encoding for
135	 * input/output documents. The possible values for encoding are: 
136	 * ascii, latin0, latin1,
137	 * raw, utf8, iso2022,
138	 * mac, win1252, ibm858,
139	 * utf16, utf16le, utf16be,
140	 * big5, and shiftjis.
141	 * </p>
142	 * @param use_include_path bool[optional] <p>
143	 * Search for the file in the include_path.
144	 * </p>
145	 * @return string the repaired contents as a string.
146	 */
147	public function repairFile ($filename, $config = null, $encoding = null, $use_include_path = null) {}
148
149	/**
150	 * Run configured diagnostics on parsed and repaired markup
151	 * @link http://www.php.net/manual/en/function.tidy-diagnose.php
152	 * @return bool Returns true on success or false on failure.
153	 */
154	public function diagnose () {}
155
156	/**
157	 * Get release date (version) for Tidy library
158	 * @link http://www.php.net/manual/en/tidy.getrelease.php
159	 * @return string a string with the release date of the Tidy library.
160	 */
161	public function getRelease () {}
162
163	/**
164	 * Get current Tidy configuration
165	 * @link http://www.php.net/manual/en/tidy.getconfig.php
166	 * @return array an array of configuration options.
167	 * </p>
168	 * <p>
169	 * For an explanation about each option, visit &url.tidy.conf;.
170	 */
171	public function getConfig () {}
172
173	/**
174	 * Get status of specified document
175	 * @link http://www.php.net/manual/en/tidy.getstatus.php
176	 * @return int 0 if no error/warning was raised, 1 for warnings or accessibility
177	 * errors, or 2 for errors.
178	 */
179	public function getStatus () {}
180
181	public function getHtmlVer () {}
182
183	/**
184	 * Indicates if the document is a XHTML document
185	 * @link http://www.php.net/manual/en/tidy.isxhtml.php
186	 * @return bool This function returns true if the specified tidy
187	 * object is a XHTML document, or false otherwise.
188	 * </p>
189	 * <p>
190	 * This function is not yet implemented in the Tidylib itself, so it always
191	 * return false.
192	 */
193	public function isXhtml () {}
194
195	/**
196	 * Indicates if the document is a generic (non HTML/XHTML) XML document
197	 * @link http://www.php.net/manual/en/tidy.isxml.php
198	 * @return bool This function returns true if the specified tidy
199	 * object is a generic XML document (non HTML/XHTML),
200	 * or false otherwise.
201	 * </p>
202	 * <p>
203	 * This function is not yet implemented in the Tidylib itself, so it always
204	 * return false.
205	 */
206	public function isXml () {}
207
208	/**
209	 * Returns a <classname>tidyNode</classname> object representing the root of the tidy parse tree
210	 * @link http://www.php.net/manual/en/tidy.root.php
211	 * @return tidyNode the tidyNode object.
212	 */
213	public function root () {}
214
215	/**
216	 * Returns a <classname>tidyNode</classname> object starting from the &lt;head&gt; tag of the tidy parse tree
217	 * @link http://www.php.net/manual/en/tidy.head.php
218	 * @return tidyNode the tidyNode object.
219	 */
220	public function head () {}
221
222	/**
223	 * Returns a <classname>tidyNode</classname> object starting from the &lt;html&gt; tag of the tidy parse tree
224	 * @link http://www.php.net/manual/en/tidy.html.php
225	 * @return tidyNode the tidyNode object.
226	 */
227	public function html () {}
228
229	/**
230	 * Returns a <classname>tidyNode</classname> object starting from the &lt;body&gt; tag of the tidy parse tree
231	 * @link http://www.php.net/manual/en/tidy.body.php
232	 * @return tidyNode the detected HTML version.
233	 * </p>
234	 * <p>
235	 * This function is not yet implemented in the Tidylib itself, so it always
236	 * return 0.
237	 */
238	public function body () {}
239
240	/**
241	 * Constructs a new <classname>tidy</classname> object
242	 * @link http://www.php.net/manual/en/tidy.construct.php
243	 * @param filename string[optional] <p>
244	 * If the filename parameter is given, this function
245	 * will also read that file and initialize the object with the file,
246	 * acting like tidy_parse_file.
247	 * </p>
248	 * @param config mixed[optional] <p>
249	 * The config config can be passed either as an
250	 * array or as a string. If a string is passed, it is interpreted as the
251	 * name of the configuration file, otherwise, it is interpreted as the
252	 * options themselves.
253	 * </p>
254	 * <p>
255	 * For an explanation about each option, visit &url.tidy.conf;.
256	 * </p>
257	 * @param encoding string[optional] <p>
258	 * The encoding parameter sets the encoding for
259	 * input/output documents. The possible values for encoding are: 
260	 * ascii, latin0, latin1,
261	 * raw, utf8, iso2022,
262	 * mac, win1252, ibm858,
263	 * utf16, utf16le, utf16be,
264	 * big5, and shiftjis.
265	 * </p>
266	 * @param use_include_path bool[optional] <p>
267	 * Search for the file in the include_path.
268	 * </p>
269	 * @return tidy the new tidy instance.
270	 */
271	public function __construct ($filename = null, $config = null, $encoding = null, $use_include_path = null) {}
272
273}
274
275final class tidyNode  {
276
277	/**
278	 * Checks if a node has children
279	 * @link http://www.php.net/manual/en/tidynode.haschildren.php
280	 * @return bool true if the node has children, false otherwise.
281	 */
282	public function hasChildren () {}
283
284	/**
285	 * Checks if a node has siblings
286	 * @link http://www.php.net/manual/en/tidynode.hassiblings.php
287	 * @return bool true if the node has siblings, false otherwise.
288	 */
289	public function hasSiblings () {}
290
291	/**
292	 * Checks if a node represents a comment
293	 * @link http://www.php.net/manual/en/tidynode.iscomment.php
294	 * @return bool true if the node is a comment, false otherwise.
295	 */
296	public function isComment () {}
297
298	/**
299	 * Checks if a node is part of a HTML document
300	 * @link http://www.php.net/manual/en/tidynode.ishtml.php
301	 * @return bool true if the node is part of a HTML document, false otherwise.
302	 */
303	public function isHtml () {}
304
305	/**
306	 * Checks if a node represents text (no markup)
307	 * @link http://www.php.net/manual/en/tidynode.istext.php
308	 * @return bool true if the node represent a text, false otherwise.
309	 */
310	public function isText () {}
311
312	/**
313	 * Checks if this node is JSTE
314	 * @link http://www.php.net/manual/en/tidynode.isjste.php
315	 * @return bool true if the node is JSTE, false otherwise.
316	 */
317	public function isJste () {}
318
319	/**
320	 * Checks if this node is ASP
321	 * @link http://www.php.net/manual/en/tidynode.isasp.php
322	 * @return bool true if the node is ASP, false otherwise.
323	 */
324	public function isAsp () {}
325
326	/**
327	 * Checks if a node is PHP
328	 * @link http://www.php.net/manual/en/tidynode.isphp.php
329	 * @return bool true if the current node is PHP code, false otherwise.
330	 */
331	public function isPhp () {}
332
333	/**
334	 * Returns the parent node of the current node
335	 * @link http://www.php.net/manual/en/tidynode.getparent.php
336	 * @return tidyNode a tidyNode if the node has a parent, or &null;
337	 * otherwise.
338	 */
339	public function getParent () {}
340
341}
342
343function tidy_getopt () {}
344
345function tidy_parse_string () {}
346
347function tidy_parse_file () {}
348
349/**
350 * Return a string representing the parsed tidy markup
351 * @link http://www.php.net/manual/en/function.tidy-get-output.php
352 * @param object tidy <p>
353 * &tidy.object;
354 * </p>
355 * @return string the parsed tidy markup.
356 */
357function tidy_get_output (tidy $object) {}
358
359/**
360 * Return warnings and errors which occurred parsing the specified document
361 * @link http://www.php.net/manual/en/function.tidy-get-error-buffer.php
362 * @param object tidy <p>
363 * &tidy.object;
364 * </p>
365 * @return string the error buffer as a string.
366 */
367function tidy_get_error_buffer (tidy $object) {}
368
369function tidy_clean_repair () {}
370
371function tidy_repair_string () {}
372
373function tidy_repair_file () {}
374
375function tidy_diagnose () {}
376
377function tidy_get_release () {}
378
379function tidy_get_config () {}
380
381function tidy_get_status () {}
382
383function tidy_get_html_ver () {}
384
385function tidy_is_xhtml () {}
386
387function tidy_is_xml () {}
388
389/**
390 * Returns the Number of Tidy errors encountered for specified document
391 * @link http://www.php.net/manual/en/function.tidy-error-count.php
392 * @param object tidy <p>
393 * &tidy.object;
394 * </p>
395 * @return int the number of errors.
396 */
397function tidy_error_count (tidy $object) {}
398
399/**
400 * Returns the Number of Tidy warnings encountered for specified document
401 * @link http://www.php.net/manual/en/function.tidy-warning-count.php
402 * @param object tidy <p>
403 * &tidy.object;
404 * </p>
405 * @return int the number of warnings.
406 */
407function tidy_warning_count (tidy $object) {}
408
409/**
410 * Returns the Number of Tidy accessibility warnings encountered for specified document
411 * @link http://www.php.net/manual/en/function.tidy-access-count.php
412 * @param object tidy <p>
413 * &tidy.object;
414 * </p>
415 * @return int the number of warnings.
416 */
417function tidy_access_count (tidy $object) {}
418
419/**
420 * Returns the Number of Tidy configuration errors encountered for specified document
421 * @link http://www.php.net/manual/en/function.tidy-config-count.php
422 * @param object tidy <p>
423 * &tidy.object;
424 * </p>
425 * @return int the number of errors.
426 */
427function tidy_config_count (tidy $object) {}
428
429function tidy_get_root () {}
430
431function tidy_get_head () {}
432
433function tidy_get_html () {}
434
435function tidy_get_body () {}
436
437/**
438 * ob_start callback function to repair the buffer
439 * @link http://www.php.net/manual/en/function.ob-tidyhandler.php
440 * @param input string <p>
441 * The buffer.
442 * </p>
443 * @param mode int[optional] <p>
444 * The buffer mode.
445 * </p>
446 * @return string the modified buffer.
447 */
448function ob_tidyhandler ($input, $mode = null) {}
449
450define ('TIDY_TAG_UNKNOWN', 0);
451define ('TIDY_TAG_A', 1);
452define ('TIDY_TAG_ABBR', 2);
453define ('TIDY_TAG_ACRONYM', 3);
454define ('TIDY_TAG_ADDRESS', 4);
455define ('TIDY_TAG_ALIGN', 5);
456define ('TIDY_TAG_APPLET', 6);
457define ('TIDY_TAG_AREA', 7);
458define ('TIDY_TAG_B', 8);
459define ('TIDY_TAG_BASE', 9);
460define ('TIDY_TAG_BASEFONT', 10);
461define ('TIDY_TAG_BDO', 11);
462define ('TIDY_TAG_BGSOUND', 12);
463define ('TIDY_TAG_BIG', 13);
464define ('TIDY_TAG_BLINK', 14);
465define ('TIDY_TAG_BLOCKQUOTE', 15);
466define ('TIDY_TAG_BODY', 16);
467define ('TIDY_TAG_BR', 17);
468define ('TIDY_TAG_BUTTON', 18);
469define ('TIDY_TAG_CAPTION', 19);
470define ('TIDY_TAG_CENTER', 20);
471define ('TIDY_TAG_CITE', 21);
472define ('TIDY_TAG_CODE', 22);
473define ('TIDY_TAG_COL', 23);
474define ('TIDY_TAG_COLGROUP', 24);
475define ('TIDY_TAG_COMMENT', 25);
476define ('TIDY_TAG_DD', 26);
477define ('TIDY_TAG_DEL', 27);
478define ('TIDY_TAG_DFN', 28);
479define ('TIDY_TAG_DIR', 29);
480define ('TIDY_TAG_DIV', 30);
481define ('TIDY_TAG_DL', 31);
482define ('TIDY_TAG_DT', 32);
483define ('TIDY_TAG_EM', 33);
484define ('TIDY_TAG_EMBED', 34);
485define ('TIDY_TAG_FIELDSET', 35);
486define ('TIDY_TAG_FONT', 36);
487define ('TIDY_TAG_FORM', 37);
488define ('TIDY_TAG_FRAME', 38);
489define ('TIDY_TAG_FRAMESET', 39);
490define ('TIDY_TAG_H1', 40);
491define ('TIDY_TAG_H2', 41);
492define ('TIDY_TAG_H3', 42);
493define ('TIDY_TAG_H4', 43);
494define ('TIDY_TAG_H5', 44);
495define ('TIDY_TAG_H6', 45);
496define ('TIDY_TAG_HEAD', 46);
497define ('TIDY_TAG_HR', 47);
498define ('TIDY_TAG_HTML', 48);
499define ('TIDY_TAG_I', 49);
500define ('TIDY_TAG_IFRAME', 50);
501define ('TIDY_TAG_ILAYER', 51);
502define ('TIDY_TAG_IMG', 52);
503define ('TIDY_TAG_INPUT', 53);
504define ('TIDY_TAG_INS', 54);
505define ('TIDY_TAG_ISINDEX', 55);
506define ('TIDY_TAG_KBD', 56);
507define ('TIDY_TAG_KEYGEN', 57);
508define ('TIDY_TAG_LABEL', 58);
509define ('TIDY_TAG_LAYER', 59);
510define ('TIDY_TAG_LEGEND', 60);
511define ('TIDY_TAG_LI', 61);
512define ('TIDY_TAG_LINK', 62);
513define ('TIDY_TAG_LISTING', 63);
514define ('TIDY_TAG_MAP', 64);
515define ('TIDY_TAG_MARQUEE', 65);
516define ('TIDY_TAG_MENU', 66);
517define ('TIDY_TAG_META', 67);
518define ('TIDY_TAG_MULTICOL', 68);
519define ('TIDY_TAG_NOBR', 69);
520define ('TIDY_TAG_NOEMBED', 70);
521define ('TIDY_TAG_NOFRAMES', 71);
522define ('TIDY_TAG_NOLAYER', 72);
523define ('TIDY_TAG_NOSAVE', 73);
524define ('TIDY_TAG_NOSCRIPT', 74);
525define ('TIDY_TAG_OBJECT', 75);
526define ('TIDY_TAG_OL', 76);
527define ('TIDY_TAG_OPTGROUP', 77);
528define ('TIDY_TAG_OPTION', 78);
529define ('TIDY_TAG_P', 79);
530define ('TIDY_TAG_PARAM', 80);
531define ('TIDY_TAG_PLAINTEXT', 81);
532define ('TIDY_TAG_PRE', 82);
533define ('TIDY_TAG_Q', 83);
534define ('TIDY_TAG_RB', 84);
535define ('TIDY_TAG_RBC', 85);
536define ('TIDY_TAG_RP', 86);
537define ('TIDY_TAG_RT', 87);
538define ('TIDY_TAG_RTC', 88);
539define ('TIDY_TAG_RUBY', 89);
540define ('TIDY_TAG_S', 90);
541define ('TIDY_TAG_SAMP', 91);
542define ('TIDY_TAG_SCRIPT', 92);
543define ('TIDY_TAG_SELECT', 93);
544define ('TIDY_TAG_SERVER', 94);
545define ('TIDY_TAG_SERVLET', 95);
546define ('TIDY_TAG_SMALL', 96);
547define ('TIDY_TAG_SPACER', 97);
548define ('TIDY_TAG_SPAN', 98);
549define ('TIDY_TAG_STRIKE', 99);
550define ('TIDY_TAG_STRONG', 100);
551define ('TIDY_TAG_STYLE', 101);
552define ('TIDY_TAG_SUB', 102);
553define ('TIDY_TAG_SUP', 103);
554define ('TIDY_TAG_TABLE', 104);
555define ('TIDY_TAG_TBODY', 105);
556define ('TIDY_TAG_TD', 106);
557define ('TIDY_TAG_TEXTAREA', 107);
558define ('TIDY_TAG_TFOOT', 108);
559define ('TIDY_TAG_TH', 109);
560define ('TIDY_TAG_THEAD', 110);
561define ('TIDY_TAG_TITLE', 111);
562define ('TIDY_TAG_TR', 112);
563define ('TIDY_TAG_TT', 113);
564define ('TIDY_TAG_U', 114);
565define ('TIDY_TAG_UL', 115);
566define ('TIDY_TAG_VAR', 116);
567define ('TIDY_TAG_WBR', 117);
568define ('TIDY_TAG_XMP', 118);
569define ('TIDY_NODETYPE_ROOT', 0);
570define ('TIDY_NODETYPE_DOCTYPE', 1);
571define ('TIDY_NODETYPE_COMMENT', 2);
572define ('TIDY_NODETYPE_PROCINS', 3);
573define ('TIDY_NODETYPE_TEXT', 4);
574define ('TIDY_NODETYPE_START', 5);
575define ('TIDY_NODETYPE_END', 6);
576define ('TIDY_NODETYPE_STARTEND', 7);
577define ('TIDY_NODETYPE_CDATA', 8);
578define ('TIDY_NODETYPE_SECTION', 9);
579define ('TIDY_NODETYPE_ASP', 10);
580define ('TIDY_NODETYPE_JSTE', 11);
581define ('TIDY_NODETYPE_PHP', 12);
582define ('TIDY_NODETYPE_XMLDECL', 13);
583
584// End of tidy v.2.0
585?>