PHP Трейт Scalr\Api\Service\User\V1beta0\Controller\GlobalVariableTrait

Автор: N.V.
Показать файл Открыть проект

Открытые методы

Метод Описание
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 ) : GlobalVariable 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

Защищенные методы

Метод Описание
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

Описание методов

getActualValue() защищенный Метод

Extracts most relevant property of the Global Variable with given the possible new values
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
Результат mixed Returns the value of the property

getActualVariableScope() защищенный Метод

Extracts actual variable scope
protected getActualVariableScope ( array $variable ) : string
$variable array Array representation of Global Variable
Результат string

getCleanVarDefinition() защищенный Метод

Returns cleaned definition of a Global Variable without empty fields
protected getCleanVarDefinition ( array $variable ) : array
$variable array Array representation of Global Variable
Результат array

getGlobalVariable() публичный Метод

Gets a specific global variable data
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
Результат mixed

makeGlobalVariableEntity() публичный Метод

Makes GlobalVariable entity
public makeGlobalVariableEntity ( array $variable ) : GlobalVariable
$variable array The array representation of global variable
Результат Scalr\Model\Entity\GlobalVariable

updateGlobalVariable() публичный Метод

Updates Global Variable
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