<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Get current Tidy configuration</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="tidy.props.errorbuffer.html">tidy::$errorBuffer</a></div> <div class="next" style="text-align: right; float: right;"><a href="tidy.gethtmlver.html">tidy::getHtmlVer</a></div> <div class="up"><a href="class.tidy.html">tidy</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="tidy.getconfig" class="refentry"> <div class="refnamediv"> <h1 class="refname">tidy::getConfig</h1> <h1 class="refname">tidy_get_config</h1> <p class="verinfo">(PHP 5, PECL tidy >= 0.7.0)</p><p class="refpurpose"><span class="refname">tidy::getConfig</span> -- <span class="refname">tidy_get_config</span> — <span class="dc-title">Get current Tidy configuration</span></p> </div> <div class="refsect1 description" id="refsect1-tidy.getconfig-description"> <h3 class="title">Description</h3> <p class="para">Object oriented style</p> <div class="methodsynopsis dc-description"> <span class="type">array</span> <span class="methodname"><strong>tidy::getConfig</strong></span> ( <span class="methodparam">void</span> )</div> <p class="para rdfs-comment">Procedural style</p> <div class="methodsynopsis dc-description"> <span class="type">array</span> <span class="methodname"><strong>tidy_get_config</strong></span> ( <span class="methodparam"><span class="type"><a href="class.tidy.html" class="type tidy">tidy</a></span> <code class="parameter">$object</code></span> )</div> <p class="para rdfs-comment"> Gets the list of the configuration options in use by the given tidy <em><code class="parameter">object</code></em>. </p> </div> <div class="refsect1 parameters" id="refsect1-tidy.getconfig-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">object</code></em></span> <dd> <p class="para"> The <a href="class.tidy.html" class="classname">Tidy</a> object. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-tidy.getconfig-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns an array of configuration options. </p> <p class="para"> For an explanation about each option, visit <a href="http://tidy.sourceforge.net/docs/quickref.html" class="link external">» http://tidy.sourceforge.net/docs/quickref.html</a>. </p> </div> <div class="refsect1 examples" id="refsect1-tidy.getconfig-examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example" id="example-4049"> <p><strong>Example #1 <span class="function"><strong>tidy::getConfig()</strong></span> example</strong></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br />$html </span><span style="color: #007700">= </span><span style="color: #DD0000">'<p>test</p>'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$config </span><span style="color: #007700">= array(</span><span style="color: #DD0000">'indent' </span><span style="color: #007700">=> </span><span style="color: #0000BB">TRUE</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'output-xhtml' </span><span style="color: #007700">=> </span><span style="color: #0000BB">TRUE</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">'wrap' </span><span style="color: #007700">=> </span><span style="color: #0000BB">200</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$tidy </span><span style="color: #007700">= </span><span style="color: #0000BB">tidy_parse_string</span><span style="color: #007700">(</span><span style="color: #0000BB">$html</span><span style="color: #007700">, </span><span style="color: #0000BB">$config</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$tidy</span><span style="color: #007700">-></span><span style="color: #0000BB">getConfig</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> <div class="example-contents"><p>The above example will output:</p></div> <div class="example-contents screen"> <div class="cdata"><pre> Array ( [indent-spaces] => 2 [wrap] => 200 [tab-size] => 8 [char-encoding] => 1 [input-encoding] => 3 [output-encoding] => 1 [newline] => 1 [doctype-mode] => 1 [doctype] => [repeated-attributes] => 1 [alt-text] => [slide-style] => [error-file] => [output-file] => [write-back] => [markup] => 1 [show-warnings] => 1 [quiet] => [indent] => 1 [hide-endtags] => [input-xml] => [output-xml] => 1 [output-xhtml] => 1 [output-html] => [add-xml-decl] => [uppercase-tags] => [uppercase-attributes] => [bare] => [clean] => [logical-emphasis] => [drop-proprietary-attributes] => [drop-font-tags] => [drop-empty-paras] => 1 [fix-bad-comments] => 1 [break-before-br] => [split] => [numeric-entities] => [quote-marks] => [quote-nbsp] => 1 [quote-ampersand] => 1 [wrap-attributes] => [wrap-script-literals] => [wrap-sections] => 1 [wrap-asp] => 1 [wrap-jste] => 1 [wrap-php] => 1 [fix-backslash] => 1 [indent-attributes] => [assume-xml-procins] => [add-xml-space] => [enclose-text] => [enclose-block-text] => [keep-time] => [word-2000] => [tidy-mark] => [gnu-emacs] => [gnu-emacs-file] => [literal-attributes] => [show-body-only] => [fix-uri] => 1 [lower-literals] => 1 [hide-comments] => [indent-cdata] => [force-output] => 1 [show-errors] => 6 [ascii-chars] => 1 [join-classes] => [join-styles] => 1 [escape-cdata] => [language] => [ncr] => 1 [output-bom] => 2 [replace-color] => [css-prefix] => [new-inline-tags] => [new-blocklevel-tags] => [new-empty-tags] => [new-pre-tags] => [accessibility-check] => 0 [vertical-space] => [punctuation-wrap] => [merge-divs] => 1 ) </pre></div> </div> </div> </p> </div> <div class="refsect1 seealso" id="refsect1-tidy.getconfig-seealso"> <h3 class="title">See Also</h3> <ul class="simplelist"> <li class="member"> <span class="function"><a href="function.tidy-reset-config.html" class="function" rel="rdfs-seeAlso">tidy_reset_config()</a> - Restore Tidy configuration to default values</span></li> <li class="member"> <span class="function"><a href="function.tidy-save-config.html" class="function" rel="rdfs-seeAlso">tidy_save_config()</a> - Save current settings to named file</span></li> </ul> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="tidy.props.errorbuffer.html">tidy::$errorBuffer</a></div> <div class="next" style="text-align: right; float: right;"><a href="tidy.gethtmlver.html">tidy::getHtmlVer</a></div> <div class="up"><a href="class.tidy.html">tidy</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>