PHP Class Kahlan\Code\Code

Show file Open project: crysalead/kahlan Class Usage Examples

Public Methods

Method Description
run ( Callable $callable, integer $timeout ) : mixed Executes a callable until a timeout is reached or the callable returns true.
spin ( Callable $callable, integer $timeout, $delay = 100000 ) : mixed Executes a callable in a loop until a timeout is reached or the callable returns true.

Method Details

run() public static method

Executes a callable until a timeout is reached or the callable returns true.
public static run ( Callable $callable, integer $timeout ) : mixed
$callable Callable The callable to execute.
$timeout integer The timeout value.
return mixed

spin() public static method

Executes a callable in a loop until a timeout is reached or the callable returns true.
public static spin ( Callable $callable, integer $timeout, $delay = 100000 ) : mixed
$callable Callable The callable to execute.
$timeout integer The timeout value.
return mixed