« enchant_broker_describe
enchant_broker_free »

enchant_broker_dict_exists

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

enchant_broker_dict_exists — 辞書が存在するかどうかを調べる

説明

function enchant_broker_dict_exists(EnchantBroker $broker, string $tag): bool

辞書が存在するかどうかを調べます。空でないタグを使用します。

パラメータ

broker

enchant_broker_init() によって返される Enchant ブローカー。

tag

空でない、LOCALE 形式のタグ。例: us_US、ch_DE など。

戻り値

タグが存在する場合に true、存在しない場合に false を返します。

変更履歴

バージョン 説明
8.0.0 broker は、EnchantBroker クラスのインスタンスを期待するようになりました。 これより前のバージョンでは、resource が期待されていました。

例

例1 enchant_broker_dict_exists() の例

<?php
$tag = 'en_US';
$r = enchant_broker_init();
if (enchant_broker_dict_exists($r,$tag)) {
    echo $tag . " の辞書が見つかりました。\n";
}
?>

参考

関連キーワード:
broker   enchant   辞書   dict   exists   Enchant   タグ   describe   EnchantBroker   init   期待   free   ブローカー   履歴   インスタンス   resource   参考   プロバイダ   列挙
関連する関数・ページ:
function.enchant-broker-request-pwl-dict   function.enchant-broker-request-dict   function.enchant-dict-describe   function.enchant-broker-get-dict-path   function.enchant-broker-set-dict-path   function.enchant-broker-free-dict