CakeFest 2024: The Official CakePHP Conference

enchant_dict_describe

(PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL enchant >= 0.1.0 )

enchant_dict_describeDécrit un dictionnaire

Description

enchant_dict_describe(EnchantDictionary $dictionary): array

Retourne les détails d'un dictionnaire.

Liste de paramètres

dictionary

Un dictionnaire Enchant retourné par enchant_broker_request_dict() ou enchant_broker_request_pwl_dict().

Valeurs de retour

Cette fonction retourne true en cas de succès ou false si une erreur survient.

Historique

Version Description
8.0.0 dictionary attend désormais une instance de EnchantDictionary ; auparavant, une ressource était attendu.
8.0.0 Antérieur à cette version, cette fonction retournait false en cas d'échec.

Exemples

Exemple #1 Exemple avec enchant_dict_describe()

Vérifie si un dictionnaire existe en utilisant la fonction enchant_broker_dict_exists() et affiche tous les détails concernant ce dictionnaire.

<?php
$tag
= 'en_US';
$broker = enchant_broker_init();
if (
enchant_broker_dict_exists($broker,$tag)) {
$dict = enchant_broker_request_dict($r, $tag);
$dict_details = enchant_dict_describe($dict);
print_r($dict_details);
}
?>

Résultat de l'exemple ci-dessus est similaire à :

Array
(
    [lang] => en_US
    [name] => aspell
    [desc] => Aspell Provider
    [file] => /usr/lib/enchant/libenchant_aspell.so
)

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top