(PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL enchant >= 0.1.0 )
enchant_dict_describe — 描述個別字典
版本 | 說明 |
---|---|
8.0.0 |
dictionary 參數現在需要一個 EnchantDictionary 實例;先前需要的是 資源。 |
8.0.0 | 在此版本之前,函式失敗時會返回 false 。 |
範例 #1 enchant_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 )