<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.tidy.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'tidy.getconfig.php',
    1 => 'tidy::getConfig',
    2 => 'Get current Tidy configuration',
  ),
  'up' => 
  array (
    0 => 'class.tidy.php',
    1 => 'tidy',
  ),
  'prev' => 
  array (
    0 => 'tidy.props.errorbuffer.php',
    1 => 'tidy::$errorBuffer',
  ),
  'next' => 
  array (
    0 => 'tidy.gethtmlver.php',
    1 => 'tidy::getHtmlVer',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/tidy/tidy/getconfig.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<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, PHP 7, PHP 8, PECL tidy &gt;= 0.7.0)</p><p class="refpurpose"><span class="refname">tidy::getConfig</span> -- <span class="refname">tidy_get_config</span> &mdash; <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="modifier">public</span> <span class="methodname"><strong>tidy::getConfig</strong></span>(): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>

  <p class="para rdfs-comment">Procedural style</p>
  <div class="methodsynopsis dc-description"><span class="methodname"><strong>tidy_get_config</strong></span>(<span class="methodparam"><span class="type"><a href="class.tidy.php" class="type tidy">tidy</a></span> <code class="parameter">$tidy</code></span>): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>

  <p class="para rdfs-comment">
   Gets the list of the configuration options in use by the given tidy
   <code class="parameter">tidy</code>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-tidy.getconfig-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">tidy</code></dt>
     <dd>
      <p class="para">
       The <span class="classname"><a href="class.tidy.php" class="classname">Tidy</a></span> object.
      </p>
     </dd>
    
   </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://api.html-tidy.org/#quick-reference" class="link external">&raquo;&nbsp;http://api.html-tidy.org/#quick-reference</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-1">
    <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">&lt;?php<br />$html </span><span style="color: #007700">= </span><span style="color: #DD0000">'&lt;p&gt;test&lt;/p&gt;'</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">=&gt; </span><span style="color: #0000BB">TRUE</span><span style="color: #007700">,<br />                </span><span style="color: #DD0000">'output-xhtml' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">TRUE</span><span style="color: #007700">,<br />                </span><span style="color: #DD0000">'wrap' </span><span style="color: #007700">=&gt; </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">-&gt;</span><span style="color: #0000BB">getConfig</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>The above example will output:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Array
(
    [indent-spaces] =&gt; 2
    [wrap] =&gt; 200
    [tab-size] =&gt; 8
    [char-encoding] =&gt; 1
    [input-encoding] =&gt; 3
    [output-encoding] =&gt; 1
    [newline] =&gt; 1
    [doctype-mode] =&gt; 1
    [doctype] =&gt;
    [repeated-attributes] =&gt; 1
    [alt-text] =&gt;
    [slide-style] =&gt;
    [error-file] =&gt;
    [output-file] =&gt;
    [write-back] =&gt;
    [markup] =&gt; 1
    [show-warnings] =&gt; 1
    [quiet] =&gt;
    [indent] =&gt; 1
    [hide-endtags] =&gt;
    [input-xml] =&gt;
    [output-xml] =&gt; 1
    [output-xhtml] =&gt; 1
    [output-html] =&gt;
    [add-xml-decl] =&gt;
    [uppercase-tags] =&gt;
    [uppercase-attributes] =&gt;
    [bare] =&gt;
    [clean] =&gt;
    [logical-emphasis] =&gt;
    [drop-proprietary-attributes] =&gt;
    [drop-font-tags] =&gt;
    [drop-empty-paras] =&gt; 1
    [fix-bad-comments] =&gt; 1
    [break-before-br] =&gt;
    [split] =&gt;
    [numeric-entities] =&gt;
    [quote-marks] =&gt;
    [quote-nbsp] =&gt; 1
    [quote-ampersand] =&gt; 1
    [wrap-attributes] =&gt;
    [wrap-script-literals] =&gt;
    [wrap-sections] =&gt; 1
    [wrap-asp] =&gt; 1
    [wrap-jste] =&gt; 1
    [wrap-php] =&gt; 1
    [fix-backslash] =&gt; 1
    [indent-attributes] =&gt;
    [assume-xml-procins] =&gt;
    [add-xml-space] =&gt;
    [enclose-text] =&gt;
    [enclose-block-text] =&gt;
    [keep-time] =&gt;
    [word-2000] =&gt;
    [tidy-mark] =&gt;
    [gnu-emacs] =&gt;
    [gnu-emacs-file] =&gt;
    [literal-attributes] =&gt;
    [show-body-only] =&gt;
    [fix-uri] =&gt; 1
    [lower-literals] =&gt; 1
    [hide-comments] =&gt;
    [indent-cdata] =&gt;
    [force-output] =&gt; 1
    [show-errors] =&gt; 6
    [ascii-chars] =&gt; 1
    [join-classes] =&gt;
    [join-styles] =&gt; 1
    [escape-cdata] =&gt;
    [language] =&gt;
    [ncr] =&gt; 1
    [output-bom] =&gt; 2
    [replace-color] =&gt;
    [css-prefix] =&gt;
    [new-inline-tags] =&gt;
    [new-blocklevel-tags] =&gt;
    [new-empty-tags] =&gt;
    [new-pre-tags] =&gt;
    [accessibility-check] =&gt; 0
    [vertical-space] =&gt;
    [punctuation-wrap] =&gt;
    [merge-divs] =&gt; 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><span class="function"><strong>tidy_reset_config()</strong></span></li>
   <li><span class="function"><strong>tidy_save_config()</strong></span></li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>