PHP Interface Kraken\Loop\LoopResourceInterface

Inheritance: extends LoopAwareInterface
Show file Open project: kraken-php/framework

Public Methods

Method Description
isPaused ( ) : boolean Check if resource is paused or not.
pause ( ) Temporarily pause the resource.
resume ( ) Resume the resource.

Method Details

isPaused() public method

This method allow to check whether the object is in paused state, meaning all of streams it contains are detached from loop or are they still active.
public isPaused ( ) : boolean
return boolean

pause() public method

This method allows to detach all resources contained within the object from writable and readable streams of active loop, preventing from writing or reading any data done by it.
public pause ( )

resume() public method

This method allows to reattach all resources of given object back to its original writable and readable streams of active loop.
public resume ( )