Documentation

DefaultHandler
in package
implements HandlerInterface

默认处理器,使用workerman基础事件

Table of Contents

Interfaces

HandlerInterface
协程处理器接口

Properties

$debug  : bool
测试用,为保证覆盖生成时不会无限等待

Methods

initEnv()  : void
default handler无需初始化
isAvailable()  : bool
default handler永远返回true
waitFor()  : void
等待直到回调返回true

Properties

$debug

测试用,为保证覆盖生成时不会无限等待

public static bool $debug = false
Tags
codeCoverageIgnore

Methods

initEnv()

default handler无需初始化

public static initEnv() : void
Tags
inheritdoc

isAvailable()

default handler永远返回true

public static isAvailable() : bool
Tags
inheritdoc
Return values
bool

返回是否可用

waitFor()

等待直到回调返回true

public static waitFor([Closure|null $closure = null ][, float|int $timeout = -1 ]) : void
Parameters
$closure : Closure|null = null

返回true或抛出异常则跳出等待

$timeout : float|int = -1

单位:秒| -1:不限制等待时间

Tags
inheritdoc

        
On this page

Search results