PHP Class Scalr\Farm\Role\FarmRoleStorage

Mostra file Open project: scalr/scalr Class Usage Examples

Protected Properties

Property Type Description
$db ADODB_mysqli
$farmRole

Public Methods

Method Description
__construct ( DBFarmRol\DBFarmRole $dbFarmRole )
getConfigs ( ) : FarmRoleStorageConfig[]
getVolumes ( $serverIndex = null )
getVolumesConfigs ( DBServe\DBServer $dbServer, $isHostInit = true )
setConfigs ( array $configs, boolean $validate = true ) Save storage configs
setVolumes ( DBServe\DBServer $server, $volumes ) *
validateConfigs ( array $configs ) : array Validate storage configs

Method Details

__construct() public method

public __construct ( DBFarmRol\DBFarmRole $dbFarmRole )
$dbFarmRole DBFarmRol\DBFarmRole

getConfigs() public method

public getConfigs ( ) : FarmRoleStorageConfig[]
return FarmRoleStorageConfig[]

getVolumes() public method

public getVolumes ( $serverIndex = null )

getVolumesConfigs() public method

public getVolumesConfigs ( DBServe\DBServer $dbServer, $isHostInit = true )
$dbServer DBServe\DBServer

setConfigs() public method

Save storage configs
public setConfigs ( array $configs, boolean $validate = true )
$configs array Array of storage config
$validate boolean optional If true validate config before save

setVolumes() public method

*
public setVolumes ( DBServe\DBServer $server, $volumes )
$server DBServe\DBServer

validateConfigs() public method

Validate storage configs
public validateConfigs ( array $configs ) : array
$configs array Array of storage configs, structure is defined in FarmRoleStorageConfig::apply
return array Array of errors [index => error message] or empty array if configs are valid

Property Details

$db protected_oe property

protected ADODB_mysqli $db
return ADODB_mysqli

$farmRole protected_oe property

protected $farmRole