uTools-Manuals/docs/php/enchant_dict_describe.html
2019-04-28 19:00:34 +08:00

95 lines
4.5 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>Describes an individual dictionary</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.enchant-dict-describe" class="refentry">
<div class="refnamediv">
<h1 class="refname">enchant_dict_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_dict_describe</span> &mdash; <span class="dc-title">Describes an individual dictionary</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.enchant-dict-describe-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>enchant_dict_describe</strong></span>
( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$dict</code></span>
) : <span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span></div>
<p class="para rdfs-comment">
Returns the details of the dictionary.
</p>
</div>
<div class="refsect1 parameters" id="refsect1-function.enchant-dict-describe-parameters">
<h3 class="title">参数</h3>
<p class="para">
<dl>
<dt>
<code class="parameter">dict</code></dt>
<dd>
<p class="para">
Dictionary resource
</p>
</dd>
</dl>
</p>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.enchant-dict-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-dict-describe-examples">
<h3 class="title">范例</h3>
<p class="para">
<div class="example" id="example-2881">
<p><strong>Example #1 A <span class="function"><strong>enchant_dict_describe()</strong></span> example</strong></p>
<div class="example-contents"><p>
Check if a dictionary exists using
<span class="function"><a href="enchant_broker_dict_exists.html" class="function">enchant_broker_dict_exists()</a></span> and show the detail of it.
</p></div>
<div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$tag&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'en_US'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$broker&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">enchant_broker_init</span><span style="color: #007700">();<br />if&nbsp;(</span><span style="color: #0000BB">enchant_broker_dict_exists</span><span style="color: #007700">(</span><span style="color: #0000BB">$broker</span><span style="color: #007700">,</span><span style="color: #0000BB">$tag</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$dict&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">enchant_broker_request_dict</span><span style="color: #007700">(</span><span style="color: #0000BB">$r</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$tag</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$dict_details&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">enchant_dict_describe</span><span style="color: #007700">(</span><span style="color: #0000BB">$dict</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$dict_details</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>
Array
(
[lang] =&gt; en_US
[name] =&gt; aspell
[desc] =&gt; Aspell Provider
[file] =&gt; /usr/lib/enchant/libenchant_aspell.so
)
</pre></div>
</div>
</div>
</p>
</div>
</div></div></div></body></html>