PHP 클래스 XPSPL\SIG\complex\Func

Allows for performing complex signal processing using \\Closures and callable PHP variables provided in the construct. A \\Closure can be rebound into the Func object context on construct which allows maintaining variables across emits. This object was created for use in the API.
상속: extends XPSPL\SIG_Complex
파일 보기 프로젝트 열기: prggmr/xpspl

보호된 프로퍼티들

프로퍼티 타입 설명
$_function callable Function to evaluate the emitting signal.

공개 메소드들

메소드 설명
__construct ( callable $function, boolean $rebind_context = false ) Construct
evaluate ( string | integer $signal = null ) : boolean Evaluates the emitted signal by calling the $_evaluate_func function.

메소드 상세

__construct() 공개 메소드

Constructs a Func object. Allows for rebinding a \\Closure to the Func object context for maintaining variables across emits.
public __construct ( callable $function, boolean $rebind_context = false )
$function callable Callable variable to use for evaluation.
$rebind_context boolean Rebind the given closures context to this object.

evaluate() 공개 메소드

Evaluates the emitted signal by calling the $_evaluate_func function.
public evaluate ( string | integer $signal = null ) : boolean
$signal string | integer Signal to evaluate
리턴 boolean

프로퍼티 상세

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

Function to evaluate the emitting signal.
protected callable $_function
리턴 callable