PHP Interface AppserverIo\Appserver\Core\Interfaces\ApplicationServerInterface

Show file Open project: appserver-io/appserver Interface Usage Examples

Public Methods

Method Description
init ( React\Socket\ConnectionInterface $conn = null, integer $runlevel = ApplicationServerInterface::FULL ) : void The runlevel to switch to.
keepRunning ( ) : boolean Query whether the application server should keep running or not.
mode ( React\Socket\ConnectionInterface $conn, string $mode ) : void Switch to the passed mode, which can either be 'dev', 'prod' or 'install'.
runlevelToString ( integer $runlevel ) : string Translates and returns a string representation of the passed runlevel.

Method Details

init() public method

The runlevel to switch to.
public init ( React\Socket\ConnectionInterface $conn = null, integer $runlevel = ApplicationServerInterface::FULL ) : void
$conn React\Socket\ConnectionInterface The connection resource
$runlevel integer The new runlevel to switch to
return void

keepRunning() public method

Query whether the application server should keep running or not.
public keepRunning ( ) : boolean
return boolean TRUE if the server should keep running, else FALSE

mode() public method

Switch to the passed mode, which can either be 'dev', 'prod' or 'install'.
public mode ( React\Socket\ConnectionInterface $conn, string $mode ) : void
$conn React\Socket\ConnectionInterface The connection resource
$mode string The setup mode to switch to
return void

runlevelToString() public method

Translates and returns a string representation of the passed runlevel.
public runlevelToString ( integer $runlevel ) : string
$runlevel integer The runlevel to return the string representation for
return string The string representation for the passed runlevel