略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: EventConfig::__construct

2024-05-05

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";
}
// 创建跟 config 相关的 event_base
$base = new EventBase($cfg);
/* 现在 $base 配置为避免 select 后端(方法) */
?>

参见

add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/eventconfig.construct.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3