final class EventConfig (View source)

EventConfig.

Represents configuration structure which could be used in construction of the EventBase .

Constants

FEATURE_ET

FEATURE_O1

FEATURE_FDS

Methods

__construct()

__construct.

bool
avoidMethod(string $method)

avoidMethod.

bool
requireFeatures(int $feature)

requireFeatures.

bool
setFlags(int $flags)

Sets one or more flags to configure what parts of the eventual EventBase will be initialized, and how they'll work

void
setMaxDispatchInterval(int $max_interval, int $max_callbacks, int $min_priority)

setMaxDispatchInterval.

Details

__construct()

__construct.

Constructs EventConfig object.

bool avoidMethod(string $method)

avoidMethod.

Tells libevent to avoid specific event method.

Parameters

string $method

The backend method to avoid. See EventConfig constants.

Return Value

bool

Returns true on success or false on failure.

See also

https://secure.php.net/manual/en/eventconfig.avoidmethod.php

bool requireFeatures(int $feature)

requireFeatures.

Enters a required event method feature that the application demands.

Parameters

int $feature

Bitmask of required features. See EventConfig::FEATURE_* constants

Return Value

bool

Returns true on success or false on failure.

See also

https://secure.php.net/manual/en/eventconfig.requirefeatures.php

bool setFlags(int $flags)

Sets one or more flags to configure what parts of the eventual EventBase will be initialized, and how they'll work

Parameters

int $flags

Return Value

bool

void setMaxDispatchInterval(int $max_interval, int $max_callbacks, int $min_priority)

setMaxDispatchInterval.

Prevents priority inversion.

Parameters

int $max_interval

An interval after which Libevent should stop running callbacks and check for more events, or 0, if there should be no such interval.

int $max_callbacks

A number of callbacks after which Libevent should stop running callbacks and check for more events, or -1, if there should be no such limit.

int $min_priority

A priority below which max_interval and max_callbacks should not be enforced. If this is set to 0, they are enforced for events of every priority; if it's set to 1, they're enforced for events of priority 1 and above, and so on.

Return Value

void

See also

https://secure.php.net/manual/en/eventconfig.setmaxdispatchinterval.php