PHP Class Scalr\Modules\AbstractPlatformModule

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

Protected Properties

Property Type Description
$container Scalr\DependencyInjection\Container DI Container
$db ADODB_mysqli
$platform

Public Methods

Method Description
ResumeServer ( DBServer $DBServer )
__construct ( )
getConfigVariable ( string $name, Scalr_Environment $env, string $encrypted = true, string $cloudLocation = '' ) : string Gets platform property
getContainer ( ) : Container Gets DI container
getEndpointUrl ( Scalr_Environment $env, string $group = null ) : string | null Gets endpoint url for private clouds
getImageInfo ( Scalr_Environment $environment, $cloudLocation, $imageId )
getInstanceType ( $instanceTypeId, Scalr_Environment $env, $cloudLocation = null )
getOrphanedServers ( Environment $environment, $cloudLocation, $instanceIds = null )
hasCloudPrices ( Scalr_Environment $env )
setConfigVariable ( array $pars, Scalr_Environment $env, string $encrypted = true, string $cloudLocation = '' ) Sets the values for the specified platform properties

Protected Methods

Method Description
getCachedInstanceTypes ( string $platform, string $url, string $cloudLocation ) : ArrayCollection | boolean Gets active instance types for the specified cloud platform, url and location from the cache

Method Details

ResumeServer() public method

public ResumeServer ( DBServer $DBServer )
$DBServer DBServer

__construct() public method

public __construct ( )

getCachedInstanceTypes() protected method

Gets active instance types for the specified cloud platform, url and location from the cache
protected getCachedInstanceTypes ( string $platform, string $url, string $cloudLocation ) : ArrayCollection | boolean
$platform string A cloud platform
$url string A cloud endpoint url
$cloudLocation string A cloud location
return Scalr\Model\Collections\ArrayCollection | boolean Returns collection of the CloudInstanceType entities on success or false otherwise

getConfigVariable() public method

Gets platform property
Deprecation: by cloud credentials
public getConfigVariable ( string $name, Scalr_Environment $env, string $encrypted = true, string $cloudLocation = '' ) : string
$name string The name of the platform property
$env Scalr_Environment The environment
$encrypted string optional This is ignored
$cloudLocation string optional The cloud location
return string Returns the value of the specified platform property

getContainer() public method

Gets DI container
public getContainer ( ) : Container
return Scalr\DependencyInjection\Container Returns DI container

getEndpointUrl() public method

Gets endpoint url for private clouds
public getEndpointUrl ( Scalr_Environment $env, string $group = null ) : string | null
$env Scalr_Environment The scalr environment object
$group string optional The group name
return string | null Returns endpoint url for private clouds. Null otherwise.

getImageInfo() public method

See also: PlatformModuleInterface::getImageInfo()
public getImageInfo ( Scalr_Environment $environment, $cloudLocation, $imageId )
$environment Scalr_Environment

getInstanceType() public method

See also: Scalr\Modules\PlatformModuleInterface::getInstanceType()
public getInstanceType ( $instanceTypeId, Scalr_Environment $env, $cloudLocation = null )
$env Scalr_Environment

getOrphanedServers() public method

See also: Scalr\Modules\PlatformModuleInterface::getOrphanedServers()
public getOrphanedServers ( Environment $environment, $cloudLocation, $instanceIds = null )
$environment Scalr\Model\Entity\Account\Environment

hasCloudPrices() public method

See also: Scalr\Modules\PlatformModuleInterface::hasCloudPrices()
public hasCloudPrices ( Scalr_Environment $env )
$env Scalr_Environment

setConfigVariable() public method

Sets the values for the specified platform properties
Deprecation: by cloud credentials
public setConfigVariable ( array $pars, Scalr_Environment $env, string $encrypted = true, string $cloudLocation = '' )
$pars array Associative array of the keys -> value
$env Scalr_Environment The environment object
$encrypted string optional This parameter is already ignored
$cloudLocation string The cloud location

Property Details

$container protected_oe property

DI Container
protected Container,Scalr\DependencyInjection $container
return Scalr\DependencyInjection\Container

$db protected_oe property

protected ADODB_mysqli $db
return ADODB_mysqli

$platform protected_oe property

protected $platform