PHP Класс Scalr_Environment

Following phpdocumentor comments have been derived from Scalr\DependencyInjection class:
Наследование: extends Scalr_Model
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$clientId
$defaultPriority
$dtAdded
$id
$name
$status

Защищенные свойства (Protected)

Свойство Тип Описание
$dbPropertyMap
$dbTableName

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

Метод Описание
__call ( $name, $arguments )
__get ( string $id ) : mixed
addTeam ( $teamId )
applyGlobalVarsToValue ( $value )
aws ( string | DBServer | DBFarmRole | DBEBSVolume $awsRegion = null, string $awsAccessKeyId = null, string $awsSecretAccessKey = null, string $certificate = null, string $privateKey = null ) : Aws Gets an Amazon Web Service (Aws) factory instance
azure ( ) : Azure Gets an Azure client instance
clearTeams ( )
cloudCredentialsList ( array $clouds = null, array $credentialsFilter = [], array $propertiesFilter = [], boolean $cacheResult = true ) : CloudCredentials[] Gets cloud credentials for listed clouds
cloudstack ( string $platform = 'cloudstack', string $apiUrl = null, string $apiKey = null, string $secretKey = null ) : CloudStack Gets an CloudStack client instance
create ( $name, $clientId )
delete ( $id = null )
enablePlatform ( $platform, $enabled = true )
get ( string $serviceid ) : mixed Gets an service or parameter by its id.
getAccountId ( ) : integer Gets identifier of the Account
getAwsTags ( ) : array Gets AWS tags that should be applied to the resource
getEnabledPlatforms ( $cacheResult = false, $clouds = null )
getFarmsCount ( )
getFullConfiguration ( ) : array Gets client_environment_properties
getLocations ( )
getPlatformConfigValue ( string $key, boolean $encrypted = true, string $group = '' ) : mixed Gets client_environment_properties value.
getRunningServersCount ( )
getTeams ( )
init ( string $className = null ) : Scalr_Environment Init
isPlatformEnabled ( $platform )
keychain ( string $cloud ) : CloudCredentials Gets specified cloud credentials for this environment
loadDefault ( $clientId )
openstack ( OpenStackConfig | string $platform, string $region = null ) : OpenStack Gets an OpenStack client instance
removeTeam ( $teamId )
save ( $forceInsert = false )
setPlatformConfig ( array $props, boolean $encrypt = true, string $group = '' ) Saves platform config value to database.

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

Метод Описание
decryptValue ( $value )
encryptValue ( $value )

Приватные методы

Метод Описание
getEncryptedVariables ( ) : array TODO: remove all variables encapsulated in cloud credentials Gets the list of the variables which need to be encrypted when we store them to database.
getLinkedVariables ( string $linkid = null ) : array TODO: migrate to the new cloud credentials entities Gets array of the linked variables

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

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

См. также: Scalr_Model::__call()
public __call ( $name, $arguments )

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

public __get ( string $id ) : mixed
$id string serviceid
Результат mixed

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

public addTeam ( $teamId )

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

public applyGlobalVarsToValue ( $value )

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

This method ensures that aws instance is always from the current environment scope.
public aws ( string | DBServer | DBFarmRole | DBEBSVolume $awsRegion = null, string $awsAccessKeyId = null, string $awsSecretAccessKey = null, string $certificate = null, string $privateKey = null ) : Aws
$awsRegion string | DBServer | DBFarmRole | DBEBSVolume optional The region or object which has both Scalr_Environment instance and cloud location itself
$awsAccessKeyId string optional The AccessKeyId
$awsSecretAccessKey string optional The SecretAccessKey
$certificate string optional Contains x.509 certificate
$privateKey string optional The private key for the certificate
Результат Scalr\Service\Aws Returns Aws instance

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

This method ensures that azure instance is always from the current environment scope
public azure ( ) : Azure
Результат Scalr\Service\Azure Returns azure instance from DI container

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

public clearTeams ( )

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

Gets cloud credentials for listed clouds
public cloudCredentialsList ( array $clouds = null, array $credentialsFilter = [], array $propertiesFilter = [], boolean $cacheResult = true ) : CloudCredentials[]
$clouds array optional Clouds list
$credentialsFilter array optional Criteria to filter by CloudCredentials properties
$propertiesFilter array optional Criteria to filter by CloudCredentialsProperties
$cacheResult boolean optional Cache result
Результат Scalr\Model\Entity\CloudCredentials[]

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

This method ensures that cloudstack instance is always from the current environment scope
public cloudstack ( string $platform = 'cloudstack', string $apiUrl = null, string $apiKey = null, string $secretKey = null ) : CloudStack
$platform string Platform name
$apiUrl string The endpoint name url
$apiKey string Api key
$secretKey string Secret key
Результат Scalr\Service\CloudStack\CloudStack Returns cloudstack instance from DI container

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

public create ( $name, $clientId )

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

protected decryptValue ( $value )

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

См. также: Scalr_Model::delete()
public delete ( $id = null )

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

public enablePlatform ( $platform, $enabled = true )

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

protected encryptValue ( $value )

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

Gets an service or parameter by its id.
public get ( string $serviceid ) : mixed
$serviceid string
Результат mixed

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

Gets identifier of the Account
public getAccountId ( ) : integer
Результат integer Returns identifier of the Account

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

Gets AWS tags that should be applied to the resource
public getAwsTags ( ) : array
Результат array Returns list of the AWS tags

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

public getEnabledPlatforms ( $cacheResult = false, $clouds = null )

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

public getFarmsCount ( )

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

Gets client_environment_properties
public getFullConfiguration ( ) : array
Результат array Returns all config entries

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

public getLocations ( )

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

Gets client_environment_properties value.
public getPlatformConfigValue ( string $key, boolean $encrypted = true, string $group = '' ) : mixed
$key string Property name.
$encrypted boolean optional This value is ignored and never taken into account
$group string optional Group name.
Результат mixed Returns config value on success or NULL if value does not exist.

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

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

public getTeams ( )

init() публичный статический Метод

Init
public static init ( string $className = null ) : Scalr_Environment
$className string
Результат Scalr_Environment

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

public isPlatformEnabled ( $platform )

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

Gets specified cloud credentials for this environment
public keychain ( string $cloud ) : CloudCredentials
$cloud string The cloud name
Результат Scalr\Model\Entity\CloudCredentials

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

public loadDefault ( $clientId )

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

This method ensures that openstack instance is always from the current environment scope
public openstack ( OpenStackConfig | string $platform, string $region = null ) : OpenStack
$platform Scalr\Service\OpenStack\OpenStackConfig | string The platform name or Openstack config
$region string optional The region
Результат Scalr\Service\OpenStack\OpenStack Returns openstack instance from DI container

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

public removeTeam ( $teamId )

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

См. также: Scalr_Model::save()
public save ( $forceInsert = false )

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

This operation will update client_environment_properties table or delete if value is null.
public setPlatformConfig ( array $props, boolean $encrypt = true, string $group = '' )
$props array List of properties with its values keypairs to save.
$encrypt boolean optional This value is ignored and never taken into account.
$group string Group

Описание свойств

$clientId публичное свойство

public $clientId

$dbPropertyMap защищенное свойство

protected $dbPropertyMap

$dbTableName защищенное свойство

protected $dbTableName

$defaultPriority публичное свойство

public $defaultPriority

$dtAdded публичное свойство

public $dtAdded

$id публичное свойство

public $id

$name публичное свойство

public $name

$status публичное свойство

public $status