Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 6261

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!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>Returns the Number of Tidy accessibility warnings encountered for specified document</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.ob-tidyhandler.html">ob_tidyhandler</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.tidy-config-count.html">tidy_config_count</a></div>
 <div class="up"><a href="ref.tidy.html">Tidy Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.tidy-access-count" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">tidy_access_count</h1>
  <p class="verinfo">(PHP 5, PECL tidy &gt;= 0.5.2)</p><p class="refpurpose"><span class="refname">tidy_access_count</span> &mdash; <span class="dc-title">Returns the Number of Tidy accessibility warnings encountered for specified document</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.tidy-access-count-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">int</span> <span class="methodname"><strong>tidy_access_count</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">
    <span class="function"><strong>tidy_access_count()</strong></span> returns the number of
   accessibility warnings found for the specified document.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.tidy-access-count-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-function.tidy-access-count-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns the number of warnings.
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-function.tidy-access-count-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-4070">
    <p><strong>Example #1  <span class="function"><strong>tidy_access_count()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br />$html&nbsp;</span><span style="color: #007700">=</span><span style="color: #DD0000">'&lt;!DOCTYPE&nbsp;html&nbsp;PUBLIC&nbsp;"-//W3C//DTD&nbsp;HTML&nbsp;3.2//EN"&gt;<br />&lt;html&gt;&lt;head&gt;&lt;title&gt;Title&lt;/title&gt;&lt;/head&gt;<br />&lt;body&gt;<br /><br />&lt;p&gt;&lt;img&nbsp;src="img.png"&gt;&lt;/p&gt;<br /><br />&lt;/body&gt;&lt;/html&gt;'</span><span style="color: #007700">;<br /><br /><br /></span><span style="color: #FF8000">//&nbsp;select&nbsp;the&nbsp;accessibility&nbsp;check&nbsp;level:&nbsp;1,&nbsp;2&nbsp;or&nbsp;3<br /></span><span style="color: #0000BB">$config&nbsp;</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #DD0000">'accessibility-check'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$tidy&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">tidy</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$tidy</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">parseString</span><span style="color: #007700">(</span><span style="color: #0000BB">$html</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$config</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$tidy</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">cleanRepair</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">/*&nbsp;Never&nbsp;forget&nbsp;to&nbsp;call&nbsp;this!&nbsp;*/<br /></span><span style="color: #0000BB">$tidy</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">diagnose</span><span style="color: #007700">();<br /><br />echo&nbsp;</span><span style="color: #0000BB">tidy_access_count</span><span style="color: #007700">(</span><span style="color: #0000BB">$tidy</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//5<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>

 <div class="refsect1 notes" id="refsect1-function.tidy-access-count-notes">
  <h3 class="title">Notes</h3>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    Due to the design of the TidyLib, you must call
     <span class="function"><a href="tidy.diagnose.html" class="function">tidy_diagnose()</a></span> before
     <span class="function"><strong>tidy_access_count()</strong></span> or it will return always
    <em>0</em>. You must also need to enable the
    <em>accessibility-check</em> option.
   </p>
  </p></blockquote>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.tidy-access-count-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"> <span class="function"><a href="function.tidy-error-count.html" class="function" rel="rdfs-seeAlso">tidy_error_count()</a> - Returns the Number of Tidy errors encountered for specified document</span></li>
    <li class="member"> <span class="function"><a href="function.tidy-warning-count.html" class="function" rel="rdfs-seeAlso">tidy_warning_count()</a> - Returns the Number of Tidy warnings encountered for specified document</span></li>
   </ul>
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.ob-tidyhandler.html">ob_tidyhandler</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.tidy-config-count.html">tidy_config_count</a></div>
 <div class="up"><a href="ref.tidy.html">Tidy Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>