Php/docs/function.enchant-dict-describe

提供:Dev Guides
< Php
移動先:案内検索

enchant_dict_describe

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

enchant_dict_describe個々の辞書について説明する


説明

enchant_dict_describe ( EnchantDictionary $dictionary ) : array

辞書の詳細を返します。


パラメータ

dictionary
enchant_broker_request_dict() または enchant_broker_request_pwl_dict() によって返される Enchant 辞書。


返り値

成功した場合に true を、失敗した場合に false を返します。


変更履歴

バージョン 説明
8.0.0 dictionary は、EnchantDictionary クラスのインスタンスを期待するようになりました。

これより前のバージョンでは、リソース が期待されていました。

8.0.0 このバージョンより前では、この関数は失敗時に false を返していました。


例1 enchant_broker_dict_describe() の例

辞書が存在するかどうかを enchant_broker_dict_exists() で調べ、 その詳細を表示します。


<?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);}?>

上の例の出力は、 たとえば以下のようになります。


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