(PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL enchant >= 0.1.0)
enchant_broker_describe — 枚举 Enchant 提供程序
枚举 Enchant 提供程序并告诉您有关它们的一些基本信息。相同的信息通过 phpinfo() 提供。
返回一个包含可用 Enchant 提供程序及其详细信息的 array。
| 版本 | 描述 |
|---|---|
| 8.0.0 |
broker 现在期望一个 EnchantBroker 实例;以前,期望一个 resource。 |
| 8.0.0 | 在此版本之前,函数在失败时返回 false。 |
示例 #1 列出给定代理提供的后端
<?php
$r = enchant_broker_init();
$bprovides = enchant_broker_describe($r);
echo "当前代理提供以下后端:\n";
print_r($bprovides);
?>以上示例将输出类似以下内容
Current broker provides the following backend(s):
Array
(
[0] => Array
(
[name] => aspell
[desc] => Aspell Provider
[file] => /usr/lib/enchant/libenchant_aspell.so
)
[1] => Array
(
[name] => hspell
[desc] => Hspell Provider
[file] => /usr/lib/enchant/libenchant_hspell.so
)
[2] => Array
(
[name] => ispell
[desc] => Ispell Provider
[file] => /usr/lib/enchant/libenchant_ispell.so
)
[3] => Array
(
[name] => myspell
[desc] => Myspell Provider
[file] => /usr/lib/enchant/libenchant_myspell.so
)
)