PHP Class Scalr\DataType\CloudPlatformSuspensionInfo

Since: 5.9 (27.06.2015)
Author: Vitaliy Demidov ([email protected])
Show file Open project: scalr/scalr Class Usage Examples

Public Properties

Property Type Description
$cloud
$envId integer The identifier of the environment
$group string The group of client environment properties
$platform string The name of the cloud platform

Public Methods

Method Description
__construct ( integer $envId, string $platform, string $group = null ) Constructor
getLastErrorMessage ( ) : string Returns last error message
isPendingSuspend ( ) : boolean Whether current platform has suspension errors
isSuspended ( ) : boolean Whether current platform is suspended
isSuspensionException ( Exception $e ) : boolean Checks whether it is the cloud platform suspension exception
registerError ( string $errorMessage ) Registers suspension error and suspends cloud platform if the timeout is reached
resume ( ) Resumes cloud platform
suspend ( ) Suspends the cloud platform

Private Methods

Method Description
initProp ( string $name, string $value = null ) : EnvironmentProperty Initializes environment property

Method Details

__construct() public method

Constructor
public __construct ( integer $envId, string $platform, string $group = null )
$envId integer The identifier of the Client's environment
$platform string The name of the cloud platform
$group string optional The client environment property group

getLastErrorMessage() public method

Returns last error message
public getLastErrorMessage ( ) : string
return string Returns last error message

isPendingSuspend() public method

Whether current platform has suspension errors
public isPendingSuspend ( ) : boolean
return boolean Returns true if the cloud platform is in the progress of the suspension due to ongoing errors

isSuspended() public method

Whether current platform is suspended
public isSuspended ( ) : boolean
return boolean Returns true if cloud platform is suspended

isSuspensionException() public static method

Checks whether it is the cloud platform suspension exception
public static isSuspensionException ( Exception $e ) : boolean
$e Exception
return boolean Returns true if the exception is the suspension type

registerError() public method

Registers suspension error and suspends cloud platform if the timeout is reached
public registerError ( string $errorMessage )
$errorMessage string The error message

resume() public method

Resumes cloud platform
public resume ( )

suspend() public method

Suspends the cloud platform
public suspend ( )

Property Details

$cloud public property

public $cloud

$envId public property

The identifier of the environment
public int $envId
return integer

$group public property

The group of client environment properties
public string $group
return string

$platform public property

The name of the cloud platform
public string $platform
return string