uTools-Manuals/docs/php/enchant_broker_describe.html
2019-04-08 23:22:26 +08:00

118 lines
4.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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>Enumerates the Enchant providers</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.enchant-broker-describe" class="refentry">
<div class="refnamediv">
<h1 class="refname">enchant_broker_describe</h1>
<p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PECL enchant &gt;= 0.1.0)</p><p class="refpurpose"><span class="refname">enchant_broker_describe</span> &mdash; <span class="dc-title">Enumerates the Enchant providers</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.enchant-broker-describe-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>enchant_broker_describe</strong></span>
( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$broker</code></span>
) : <span class="type">array</span></div>
<p class="para rdfs-comment">
Enumerates the Enchant providers and tells you some rudimentary
information about them. The same info is provided through phpinfo().
</p>
</div>
<div class="refsect1 parameters" id="refsect1-function.enchant-broker-describe-parameters">
<h3 class="title">参数</h3>
<p class="para">
<dl>
<dt>
<code class="parameter">broker</code></dt>
<dd>
<p class="para">
Broker resource
</p>
</dd>
</dl>
</p>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.enchant-broker-describe-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
成功时返回 <strong><code>TRUE</code></strong> 或者在失败时返回 <strong><code>FALSE</code></strong>
</p>
</div>
<div class="refsect1 examples" id="refsect1-function.enchant-broker-describe-examples">
<h3 class="title">范例</h3>
<p class="para">
<div class="example" id="example-2876">
<p><strong>Example #1 List the backends provided by the given broker</strong></p>
<div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$r&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">enchant_broker_init</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$bprovides&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">enchant_broker_describe</span><span style="color: #007700">(</span><span style="color: #0000BB">$r</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #DD0000">"Current&nbsp;broker&nbsp;provides&nbsp;the&nbsp;following&nbsp;backend(s):\n"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$bprovides</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
</div>
<div class="example-contents"><p>以上例程的输出类似于:</p></div>
<div class="example-contents screen">
<div class="cdata"><pre>
Current broker provides the following backend(s):
Array
(
[0] =&gt; Array
(
[name] =&gt; aspell
[desc] =&gt; Aspell Provider
[file] =&gt; /usr/lib/enchant/libenchant_aspell.so
)
[1] =&gt; Array
(
[name] =&gt; hspell
[desc] =&gt; Hspell Provider
[file] =&gt; /usr/lib/enchant/libenchant_hspell.so
)
[2] =&gt; Array
(
[name] =&gt; ispell
[desc] =&gt; Ispell Provider
[file] =&gt; /usr/lib/enchant/libenchant_ispell.so
)
[3] =&gt; Array
(
[name] =&gt; myspell
[desc] =&gt; Myspell Provider
[file] =&gt; /usr/lib/enchant/libenchant_myspell.so
)
)
</pre></div>
</div>
</div>
</p>
</div>
</div></div></div></body></html>