Method | Description | |
---|---|---|
getGlobalVariable ( string $name, Scalr_Scripting_GlobalVariables $globalVar, integer $roleId, integer $farmId, integer $farmRoleId, string $serverId = '' ) : mixed | Gets a specific global variable data | |
makeGlobalVariableEntity ( array $variable ) : |
Makes GlobalVariable entity | |
updateGlobalVariable ( Scalr_Scripting_GlobalVariables $gvInstance, array $variable, object $object, string $name, string $scope, integer $roleId, integer $farmId, integer $farmRoleId, string $serverId = '' ) | Updates Global Variable |
Method | Description | |
---|---|---|
getActualValue ( string $property, array $variable, object $object = null, string $objectProperty = null, mixed $defaultValue = null ) : mixed | Extracts most relevant property of the Global Variable with given the possible new values | |
getActualVariableScope ( array $variable ) : string | Extracts actual variable scope | |
getCleanVarDefinition ( array $variable ) : array | Returns cleaned definition of a Global Variable without empty fields |
protected getActualValue ( string $property, array $variable, object $object = null, string $objectProperty = null, mixed $defaultValue = null ) : mixed | ||
$property | string | The name of extracting property |
$variable | array | Array representation of Global Variable that presents current state |
$object | object | optional JSON representation of Global Variable containing a new values |
$objectProperty | string | optional The name of extracting property in JSON representation |
$defaultValue | mixed | optional Default return value if it's not presented in any scope |
return | mixed | Returns the value of the property |
protected getActualVariableScope ( array $variable ) : string | ||
$variable | array | Array representation of Global Variable |
return | string |
protected getCleanVarDefinition ( array $variable ) : array | ||
$variable | array | Array representation of Global Variable |
return | array |
public getGlobalVariable ( string $name, Scalr_Scripting_GlobalVariables $globalVar, integer $roleId, integer $farmId, integer $farmRoleId, string $serverId = '' ) : mixed | ||
$name | string | Variable name |
$globalVar | Scalr_Scripting_GlobalVariables | Instance of Global variable handler |
$roleId | integer | optional The ID of GV Role |
$farmId | integer | optional The ID of GV Farm |
$farmRoleId | integer | optional The ID of GV Farm Role |
$serverId | string | optional The ID of GV Server |
return | mixed |
public makeGlobalVariableEntity ( array $variable ) : |
||
$variable | array | The array representation of global variable |
return |
public updateGlobalVariable ( Scalr_Scripting_GlobalVariables $gvInstance, array $variable, object $object, string $name, string $scope, integer $roleId, integer $farmId, integer $farmRoleId, string $serverId = '' ) | ||
$gvInstance | Scalr_Scripting_GlobalVariables | Instance of Global variable handler |
$variable | array | Array representation of Global Variable that presents current state |
$object | object | JSON representation of Global Variable containing a new values |
$name | string | The name of the Global Variable |
$scope | string | Scope of the Global Variable |
$roleId | integer | optional The ID of GV Role |
$farmId | integer | optional The ID of GV Farm |
$farmRoleId | integer | optional The ID of GV Farm Role |
$serverId | string | optional The ID of GV Server |