EventConfig::__construct

(PECL event >= 1.2.6-beta)

EventConfig::__constructEventConfig 構造函數

說明

public EventConfig::__construct()

構造 EventConfig 對象,可傳遞給 EventBase::__construct() 構造函數。

參數

此函數沒有參數。

返回值

返回 EventConfig 對象。

范例

示例 #1 EventConfig::__construct() 示例

<?php
// 避免 "select" 方法
$cfg = new EventConfig();
if (
$cfg->avoidMethod("select")) {
    echo 
"'select' 方法失效\n";
}
// 創(chuàng)建跟 config 相關的 event_base
$base = new EventBase($cfg);
/* 現在 $base 配置為避免 select 后端(方法) */
?>

參見