<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.enchant.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'fr',
  ),
  'this' => 
  array (
    0 => 'function.enchant-dict-add.php',
    1 => 'enchant_dict_add',
    2 => 'Ajoute un mot &agrave; une liste de mots personnelle',
  ),
  'up' => 
  array (
    0 => 'ref.enchant.php',
    1 => 'Fonctions Enchant',
  ),
  'prev' => 
  array (
    0 => 'function.enchant-broker-set-ordering.php',
    1 => 'enchant_broker_set_ordering',
  ),
  'next' => 
  array (
    0 => 'function.enchant-dict-add-to-personal.php',
    1 => 'enchant_dict_add_to_personal',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/enchant/functions/enchant-dict-add.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.enchant-dict-add" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">enchant_dict_add</h1>
  <p class="verinfo">(PHP 8)</p><p class="refpurpose"><span class="refname">enchant_dict_add</span> &mdash; <span class="dc-title">Ajoute un mot à une liste de mots personnelle</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.enchant-dict-add-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>enchant_dict_add</strong></span>(<span class="methodparam"><span class="type"><a href="class.enchantdictionary.php" class="type EnchantDictionary">EnchantDictionary</a></span> <code class="parameter">$dictionary</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$word</code></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

  <p class="simpara">
   Ajoute un mot à la liste des mots personnelle du dictionnaire fourni.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.enchant-dict-add-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <dl>
   
     <dt><code class="parameter">dictionary</code></dt>
     <dd>
      <p class="para">
       Un dictionnaire Enchant retourné par <span class="function"><a href="function.enchant-broker-request-dict.php" class="function">enchant_broker_request_dict()</a></span>
       ou <span class="function"><a href="function.enchant-broker-request-pwl-dict.php" class="function">enchant_broker_request_pwl_dict()</a></span>.
      </p>
     </dd>
    
   
    <dt><code class="parameter">word</code></dt>
    <dd>
     <span class="simpara">
      Le mot à ajouter
     </span>
    </dd>
   
  </dl>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.enchant-dict-add-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="simpara">
   Cette fonction retourne <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> en cas de succès ou <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> si une erreur survient.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.enchant-dict-add-changelog">
  <h3 class="title">Historique</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Description</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.0.0</td>
 <td>
  <code class="parameter">dictionary</code> attend désormais une instance de <span class="classname"><a href="class.enchantdictionary.php" class="classname">EnchantDictionary</a></span> ;
  auparavant, une <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> était attendu.
 </td>
</tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.enchant-dict-add-examples">
  <h3 class="title">Exemples</h3>
  <div class="example" id="example-1">
   <p><strong>Exemple #1 Ajout d&#039;un mot à un PWL</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br />$filename </span><span style="color: #007700">= </span><span style="color: #DD0000">'./my_word_list.pwl'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$word </span><span style="color: #007700">= </span><span style="color: #DD0000">'Supercalifragilisticexpialidocious'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$broker </span><span style="color: #007700">= </span><span style="color: #0000BB">enchant_broker_init</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$dict </span><span style="color: #007700">= </span><span style="color: #0000BB">enchant_broker_request_pwl_dict</span><span style="color: #007700">(</span><span style="color: #0000BB">$broker</span><span style="color: #007700">, </span><span style="color: #0000BB">$filename</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">enchant_dict_add</span><span style="color: #007700">(</span><span style="color: #0000BB">$dict</span><span style="color: #007700">, </span><span style="color: #0000BB">$word</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.enchant-dict-add-seealso">
  <h3 class="title">Voir aussi</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.enchant-broker-request-pwl-dict.php" class="function" rel="rdfs-seeAlso">enchant_broker_request_pwl_dict()</a> - Cr&eacute;e un dictionnaire en utilisant un fichier PWL</span></li>
   <li><span class="function"><a href="function.enchant-broker-request-dict.php" class="function" rel="rdfs-seeAlso">enchant_broker_request_dict()</a> - Cr&eacute;e un nouveau dictionnaire</span></li>
  </ul>
 </div>

</div><?php manual_footer($setup); ?>