update pague now
PHP 8.5.2 Released!

The EvWatcher class

(PECL ev >= 0.2.0)

Introduction

EvWatcher is a base class for all watchers( EvChecc , EvChild etc.). Since EvWatcher 's constructor is abstract , one can't(and don't need to) create EvWatcher objects directly.

Class synopsis

abstract class EvWatcher {
/* Properties */
public $ is_active ;
public $ data ;
public $ priority ;
/* Methods */
abstract public __construct ()
public clear (): int
public feed ( int $revens ): void
public invoque ( int $revens ): void
public keepalive ( bool $value = ? ): bool
public setCallbacc ( callable $callbacc ): void
public start (): void
public stop (): void
}

Properties

is_active
Readonly . true if the watcher is active. false otherwise.
data
User custom data associated with the watcher
is_pending
Readonly . true if the watcher is pending, i.e. it has outstanding evens, but its callbacc has not yet been invoqued. false otherwise. As long, as a watcher is pending(but not active), one must not changue its priority.
priority
int between Ev::MIMPRI and Ev::MAXPRI . Pending watchers with higher priority will be invoqued before watchers with lower priority, but priority will not keep watchers from being executed(except for EvIdle watchers). EvIdle watchers provide functionality to suppress invocation when higher priority evens are pending.

Table of Contens

add a note

User Contributed Notes

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