tidy::__construct
    (no version information, might be only in CVS)
tidy::__construct -- 
     新規 Tidy オブジェクトを生成する
    
説明
tidy 
tidy::__construct ( [string filename [, mixed config [, string encoding [, bool use_include_path]]]] )
     tidy::__construct() constructs a new tidy object.
    
     もし filename パラメータが与えられた場合、
     この関数はファイルを読み込み、tidy_parse_file()
     のように実行してファイルに基づいたオブジェクトを初期化します。
    
configパラメータは、配列または
文字列として指定することができます。文字列として指定した場合には設定ファイルの名前として解釈され、
そうでない場合はオプション自体として解釈されます。各オプションに関する説明については、
http://tidy.sourceforge.net/docs/quickref.html を参照してください。
encoding パラメータは、文書を入力/出力する際のエンコーディングを
設定します。encoding には次の値を使用可能です。
ascii, latin1, raw, utf8, iso2022, mac, win1252, utf16le, utf16be, utf16,
big5, shiftjis 
     
例 1. tidy::__construct() の例 
<?php
  $html = <<< HTML
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head><title>title</title></head> <body> <p>paragraph <bt /> text</p> </body></html>
  HTML;
  $tidy = new tidy; $tidy->parseString($html);
  $tidy->CleanRepair();
  if ($tidy->errorBuffer) {     echo "The following errors were detected:\n";     echo $tidy->errorBuffer; }
  ?>
 |  
 上の例の出力は以下となります。 The following errors were detected:
line 8 column 14 - Error: <bt> is not recognized!
line 8 column 14 - Warning: discarding unexpected <bt>  |  
  | 
    
     tidy_parse_file(),
     tidy_parse_string() も参照ください。