<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.enchant-dict-quick-check" xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>enchant_dict_quick_check</refname>
  <refpurpose>Check the word is correctly spelled and provide suggestions</refpurpose>
 </refnamediv>
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>bool</type><methodname>enchant_dict_quick_check</methodname>
   <methodparam><type>EnchantDictionary</type><parameter>dictionary</parameter></methodparam>
   <methodparam><type>string</type><parameter>word</parameter></methodparam>
   <methodparam choice="opt"><type>array</type><parameter role="reference">suggestions</parameter><initializer>&null;</initializer></methodparam>
  </methodsynopsis>
  <para>
   If the word is correctly spelled return &true;, otherwise return &false;, if suggestions variable
   is provided, fill it with spelling alternatives.
  </para>
 </refsect1>
 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    &enchant.param.dictionary;
    <varlistentry>
     <term><parameter>word</parameter></term>
     <listitem>
      <para>
       The word to check
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>suggestions</parameter></term>
     <listitem>
      <para>
       If the word is not correctly spelled, this variable will
       contain an array of suggestions.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>
 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns &true; if the word is correctly spelled or &false;
  </para>
 </refsect1>

 <refsect1 role="changelog">
  &reftitle.changelog;
  <informaltable>
   <tgroup cols="2">
    <thead>
     <row>
      <entry>&Version;</entry>
      <entry>&Description;</entry>
     </row>
    </thead>
    <tbody>
     &enchant.changelog.dictionary-param;
    </tbody>
   </tgroup>
  </informaltable>
 </refsect1>

 <refsect1 role="examples">
  &reftitle.examples;
  <para>
   <example>
    <title>A <function>enchant_dict_quick_check</function> example</title>
    <programlisting role="php">
<![CDATA[
<?php
$tag = 'en_US';
$r = enchant_broker_init();

if (enchant_broker_dict_exists($r,$tag)) {
    $d = enchant_broker_request_dict($r, $tag);
    enchant_dict_quick_check($d, 'soong', $suggs);
    print_r($suggs);
}
?>
]]>
    </programlisting>
    &example.outputs.similar;
    <screen>
<![CDATA[
Array
(
    [0] => song
    [1] => snog
    [2] => soon
    [3] => Sang
    [4] => Sung
    [5] => sang
    [6] => sung
    [7] => sponge
    [8] => spongy
    [9] => snag
    [10] => snug
    [11] => sonic
    [12] => sing
    [13] => songs
    [14] => Son
    [15] => Sonja
    [16] => Synge
    [17] => son
    [18] => Sejong
    [19] => sarong
    [20] => sooner
    [21] => Sony
    [22] => sown
    [23] => scone
    [24] => song's
)
]]>
    </screen>
   </example>
  </para>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><function>enchant_dict_check</function></member>
    <member><function>enchant_dict_suggest</function></member>
   </simplelist>
  </para>
 </refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
