CakeFest 2024: The Official CakePHP Conference

EventConfig 类

(PECL event >= 1.2.6-beta)

简介

表示可以实例化 EventBase 的配置结构。

类摘要

final class EventConfig {
/* Constants */
const int FEATURE_ET = 1;
const int FEATURE_O1 = 2;
const int FEATURE_FDS = 4;
/* 方法 */
public avoidMethod( string $method ): bool
public __construct()
public requireFeatures( int $feature ): bool
public setFlags( int $flags ): bool
public setMaxDispatchInterval( int $max_interval , int $max_callbacks , int $min_priority ): void
}

预定义常量

EventConfig::FEATURE_ET

需要支持边缘触发 I/O 的后端方法。

EventConfig::FEATURE_O1

要求添加/删除 event 或者使 event 成为活跃的后端方法是O(1)操作。

EventConfig::FEATURE_FDS

需要一个可以支持任何文件描述符类型的后端方法,而不仅仅是 socket 。

目录

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top