PHP Class AppserverIo\Appserver\Core\Utilities\Runlevels

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

Protected Properties

Property Type Description
$instance Runlevels The singleton instance.
$runlevels array String mappings for the runlevels.

Public Methods

Method Description
getRunlevel ( string $runlevel ) : integer Return's the value for the passed runlevel representation.
getRunlevels ( ) : array Return's an array with the available runlevels.
isRunlevel ( string $runlevel ) : boolean Query whether or not, the passed runlevel is valid.
singleton ( ) : Runlevels Return's the singleton instance.

Private Methods

Method Description
__clone ( ) : void This is a utility class, so protect it against cloning.
__construct ( ) This is a utility class, so protect it against direct instantiation.

Method Details

getRunlevel() public method

Return's the value for the passed runlevel representation.
public getRunlevel ( string $runlevel ) : integer
$runlevel string The runlevel to return the value for
return integer The runlevel's value

getRunlevels() public method

Return's an array with the available runlevels.
public getRunlevels ( ) : array
return array The available runlevels

isRunlevel() public method

Query whether or not, the passed runlevel is valid.
public isRunlevel ( string $runlevel ) : boolean
$runlevel string The runlevel to query
return boolean TRUE if the runlevel is valid, else FALSE

singleton() public static method

Return's the singleton instance.
public static singleton ( ) : Runlevels
return Runlevels The singleton instance

Property Details

$instance protected static property

The singleton instance.
protected static Runlevels,AppserverIo\Appserver\Core\Utilities $instance
return Runlevels

$runlevels protected property

String mappings for the runlevels.
protected array $runlevels
return array