array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ru', ), 'this' => array ( 0 => 'function.enchant-broker-describe.php', 1 => 'enchant_broker_describe', ), 'up' => array ( 0 => 'ref.enchant.php', 1 => 'Функции Enchant', ), 'prev' => array ( 0 => 'ref.enchant.php', 1 => 'Функции Enchant', ), 'next' => array ( 0 => 'function.enchant-broker-dict-exists.php', 1 => 'enchant_broker_dict_exists', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ru', 'path' => 'reference/enchant/functions/enchant-broker-describe.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL enchant >= 0.1.0)
enchant_broker_describe — Перечисляет провайдеров Enchant
Перечисляет провайдеров Enchant и возвращает минимальную информацию о них. Та же информация может быть получена через phpinfo().
Возвращает массив (array) доступных провайдеров Enchant с их данными.
Версия | Описание |
---|---|
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);
?>
Вывод приведённого примера будет похож на:
Брокер предоставляет следующие бэкенды: 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 ) )