PHP 클래스 PHPDaemon\Core\CallbackWrapper

저자: Vasily Zorin ([email protected])
상속: use trait PHPDaemon\Traits\ClassWatchdog, use trait PHPDaemon\Traits\StaticObjectWatchdog
파일 보기 프로젝트 열기: kakserpom/phpdaemon 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$cb Callback
$context Context
$timer Timer

공개 메소드들

메소드 설명
__invoke ( $args ) : mixed Invokes the callback
addToArray ( &$arr, $cb )
cancel ( ) : void Cancel
cancelTimeout ( )
extractCb ( $cb )
forceWrap ( callable $cb, double $timeout = null ) : CallbackWrapper | null Wraps callback even without context
getCallback ( )
removeFromArray ( &$arr, $cb )
setTimeout ( double $timeout )
unwrap ( ) : callable Unwraps callback
wrap ( callable $cb, double $timeout = null, $ctx = false ) : Closure Wraps callback

보호된 메소드들

메소드 설명
__construct ( callable $cb, double $timeout = null, object $context = null ) : CallbackWrapper Constructor

메소드 상세

__construct() 보호된 메소드

Constructor
protected __construct ( callable $cb, double $timeout = null, object $context = null ) : CallbackWrapper
$cb callable
$timeout double
$context object
리턴 CallbackWrapper

__invoke() 공개 메소드

Invokes the callback
public __invoke ( $args ) : mixed
$args Arguments
리턴 mixed

addToArray() 공개 정적인 메소드

public static addToArray ( &$arr, $cb )

cancel() 공개 메소드

Cancel
public cancel ( ) : void
리턴 void

cancelTimeout() 공개 메소드

public cancelTimeout ( )

extractCb() 공개 정적인 메소드

public static extractCb ( $cb )

forceWrap() 공개 정적인 메소드

Wraps callback even without context
public static forceWrap ( callable $cb, double $timeout = null ) : CallbackWrapper | null
$cb callable
$timeout double = null
리턴 CallbackWrapper | null

getCallback() 공개 메소드

public getCallback ( )

removeFromArray() 공개 정적인 메소드

public static removeFromArray ( &$arr, $cb )

setTimeout() 공개 메소드

public setTimeout ( double $timeout )
$timeout double

unwrap() 공개 메소드

Unwraps callback
public unwrap ( ) : callable
리턴 callable

wrap() 공개 정적인 메소드

Wraps callback
public static wrap ( callable $cb, double $timeout = null, $ctx = false ) : Closure
$cb callable
$timeout double = null
리턴 Closure

프로퍼티 상세

$cb 보호되어 있는 프로퍼티

Callback
protected $cb

$context 보호되어 있는 프로퍼티

Context
protected $context

$timer 보호되어 있는 프로퍼티

Timer
protected $timer