PHP Class DBFarmRole

ファイルを表示 Open project: scalr/scalr Class Usage Examples

Public Properties

Property Type Description
$Alias NOTE: Settings constants moved to Entity\FarmRoleSetting
$CloudLocation NOTE: Settings constants moved to Entity\FarmRoleSetting
$FarmID NOTE: Settings constants moved to Entity\FarmRoleSetting
$ID NOTE: Settings constants moved to Entity\FarmRoleSetting
$LaunchIndex NOTE: Settings constants moved to Entity\FarmRoleSetting
$Platform NOTE: Settings constants moved to Entity\FarmRoleSetting
$RoleID NOTE: Settings constants moved to Entity\FarmRoleSetting

Public Methods

Method Description
ClearSettings ( $filter = "" )
GetAllSettings ( ) : unknown_type Returns all role settings
GetFarmObject ( ) : DBFarm Returns DBFarm Object
GetPendingInstancesCount ( )
GetRoleID ( ) : string Returns role prototype
GetRoleObject ( ) : DBRole
GetRunningInstancesCount ( )
GetServersByFilter ( $filter_args = [], $ufilter_args = [] )
GetServiceConfiguration2 ( $behavior )
GetSetting ( string $name ) : mixed Get Role setting by name
GetSettingsByFilter ( $filter = "" )
GetSuspendedInstancesCount ( )
Load ( $farmid, $roleid, $cloudLocation ) : DBFarmRole Load DBInstance by database id
LoadByID ( $id ) : DBFarmRole Returns DBFarmRole object by id
Save ( )
SetScripts ( array $scripts, array $params = [] )
SetServiceConfiguration ( $behavior, $config )
SetSetting ( string $name, string | null $value, string $type = null ) : void Set farm role setting
__construct ( $farm_roleid ) : void Constructor
__sleep ( )
__wakeup ( )
applyDefinition ( $definition, $reset = false )
applyGlobalVarsToValue ( $value ) : string Apply FarmRole global variables to a value
getChefSettings ( )
getDefinition ( )
getFarmStatus ( ) : integer | null Gets the status of the farm which corresponds to the farm role
getInstanceType ( ) : mixed Returns instance type id
getReplacementRoles ( $includeSelf = false )
getStorage ( ) : Scalr\Farm\Role\FarmRoleStorage
isCloudstack ( )
isOpenstack ( )

Private Methods

Method Description
Unbind ( )

Method Details

ClearSettings() public method

public ClearSettings ( $filter = "" )

GetAllSettings() public method

Returns all role settings
public GetAllSettings ( ) : unknown_type
return unknown_type

GetFarmObject() public method

Returns DBFarm Object
public GetFarmObject ( ) : DBFarm
return DBFarm

GetPendingInstancesCount() public method

GetRoleID() public method

Returns role prototype
public GetRoleID ( ) : string
return string

GetRoleObject() public method

public GetRoleObject ( ) : DBRole
return DBRole

GetRunningInstancesCount() public method

GetServersByFilter() public method

public GetServersByFilter ( $filter_args = [], $ufilter_args = [] )

GetServiceConfiguration2() public method

public GetServiceConfiguration2 ( $behavior )

GetSetting() public method

Get Role setting by name
public GetSetting ( string $name ) : mixed
$name string
return mixed

GetSettingsByFilter() public method

public GetSettingsByFilter ( $filter = "" )

GetSuspendedInstancesCount() public method

Load() public static method

Load DBInstance by database id
public static Load ( $farmid, $roleid, $cloudLocation ) : DBFarmRole
return DBFarmRole

LoadByID() public static method

Returns DBFarmRole object by id
public static LoadByID ( $id ) : DBFarmRole
$id
return DBFarmRole

Save() public method

public Save ( )

SetScripts() public method

public SetScripts ( array $scripts, array $params = [] )
$scripts array
$params array

SetServiceConfiguration() public method

public SetServiceConfiguration ( $behavior, $config )

SetSetting() public method

Set farm role setting
public SetSetting ( string $name, string | null $value, string $type = null ) : void
$name string The name of the setting
$value string | null The value of the setting
$type string optional
return void

__construct() public method

Constructor
public __construct ( $farm_roleid ) : void
return void

__sleep() public method

public __sleep ( )

__wakeup() public method

public __wakeup ( )

applyDefinition() public method

public applyDefinition ( $definition, $reset = false )

applyGlobalVarsToValue() public method

Apply FarmRole global variables to a value
public applyGlobalVarsToValue ( $value ) : string
return string

getChefSettings() public method

public getChefSettings ( )

getDefinition() public method

public getDefinition ( )

getFarmStatus() public method

Gets the status of the farm which corresponds to the farm role
public getFarmStatus ( ) : integer | null
return integer | null Returns the status of the farm which corresponds to the farm role. It returns NULL if farm does not exist.

getInstanceType() public method

Returns instance type id
public getInstanceType ( ) : mixed
return mixed

getReplacementRoles() public method

public getReplacementRoles ( $includeSelf = false )

getStorage() public method

public getStorage ( ) : Scalr\Farm\Role\FarmRoleStorage
return Scalr\Farm\Role\FarmRoleStorage

isCloudstack() public method

public isCloudstack ( )

isOpenstack() public method

public isOpenstack ( )

Property Details

$Alias public_oe property

NOTE: Settings constants moved to Entity\FarmRoleSetting
public $Alias

$CloudLocation public_oe property

NOTE: Settings constants moved to Entity\FarmRoleSetting
public $CloudLocation

$FarmID public_oe property

NOTE: Settings constants moved to Entity\FarmRoleSetting
public $FarmID

$ID public_oe property

NOTE: Settings constants moved to Entity\FarmRoleSetting
public $ID

$LaunchIndex public_oe property

NOTE: Settings constants moved to Entity\FarmRoleSetting
public $LaunchIndex

$Platform public_oe property

NOTE: Settings constants moved to Entity\FarmRoleSetting
public $Platform

$RoleID public_oe property

NOTE: Settings constants moved to Entity\FarmRoleSetting
public $RoleID