EventConfig::avoidMethod
(PECL event >= 1.2.6-beta)
EventConfig::avoidMethod — 告诉 libevent 避免使用指定 event 方法
说明
public
EventConfig::avoidMethod(
string
$method
): bool告诉 libevent 避免使用指定 event 方法(后端)。参考 » 创建 event_base 。
参数
-
method
-
要避免的后端方法。 参考 EventConfig 常量 。
返回值
成功时返回 true
, 或者在失败时返回 false
。
范例
示例 #1 EventConfig::avoidMethod() 示例
<?php
$cfg = new EventConfig();
if ($cfg->avoidMethod("select")) {
echo "'select' 方法失效\n";
}
?>
参见
- EventBase::__construct() - Constructs EventBase object
add a note
User Contributed Notes
There are no user contributed notes for this page.
备份地址:http://www.lvesu.com/blog/php/eventconfig.avoidmethod.php