Source of: /manual/en/function.tidy-config-count.php
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.tidy.inc";
$setup = array (
'home' =>
array (
0 => 'index.php',
1 => 'PHP Manual',
),
'head' =>
array (
0 => 'UTF-8',
1 => 'en',
),
'this' =>
array (
0 => 'function.tidy-config-count.php',
1 => 'tidy_config_count',
),
'up' =>
array (
0 => 'ref.tidy.php',
1 => 'Tidy Functions',
),
'prev' =>
array (
0 => 'function.tidy-access-count.php',
1 => 'tidy_access_count',
),
'next' =>
array (
0 => 'function.tidy-error-count.php',
1 => 'tidy_error_count',
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<div id="function.tidy-config-count" class="refentry">
<div class="refnamediv">
<h1 class="refname">tidy_config_count</h1>
<p class="verinfo">(PHP 5, PECL tidy >= 0.5.2)</p><p class="refpurpose"><span class="refname">tidy_config_count</span> — <span class="dc-title">Returns the Number of Tidy configuration errors encountered for specified document</span></p>
</div>
<a name="function.tidy-config-count.description"></a><div class="refsect1 description">
<h3 class="title">Description</h3>
<div class="methodsynopsis dc-description">
<span class="type">int</span> <span class="methodname"><b>tidy_config_count</b></span>
( <span class="methodparam"><span class="type"><a href="class.tidy.php" class="type tidy">tidy</a></span> <tt class="parameter">$object</tt></span>
)</div>
<p class="para rdfs-comment">
Returns the number of errors encountered in the configuration of the
specified tidy <i><tt class="parameter">object</tt></i>
.
</p>
</div>
<a name="function.tidy-config-count.parameters"></a><div class="refsect1 parameters">
<h3 class="title">Parameters</h3>
<p class="para">
</p><dl>
<dt class="varlistentry">
<span class="term"><i><tt class="parameter">object</tt></i>
</span>
</dt><dd class="listitem">
<p class="para">
The <a href="class.tidy.php" class="classname">Tidy</a> object.
</p>
</dd>
</dl>
<p>
</p>
</div>
<a name="function.tidy-config-count.returnvalues"></a><div class="refsect1 returnvalues">
<h3 class="title">Return Values</h3>
<p class="para">
Returns the number of errors.
</p>
</div>
<a name="function.tidy-config-count.examples"></a><div class="refsect1 examples">
<h3 class="title">Examples</h3>
<p class="para">
</p><div class="example">
<p><b>Example #1 <b>tidy_config_count()</b> example</b></p>
<div class="example-contents programlisting">
<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</I>'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$config </span><span style="color: #007700">= array(</span><span style="color: #DD0000">'doctype' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'bogus'</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: #FF8000">/* This outputs 1, because 'bogus' isn't a valid doctype */<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">tidy_config_count</span><span style="color: #007700">(</span><span style="color: #0000BB">$tidy</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span>
</span>
</code></div>
</div>
</div><p>
</p>
</div>
</div><?php manual_footer(); ?>