PHP Class Scalr\Modules\AbstractPlatformModule

Afficher le fichier Open project: scalr/scalr Class Usage Examples

Protected Properties

Свойство Type Description
$container Scalr\DependencyInjection\Container DI Container
$db ADODB_mysqli
$platform

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode 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 méthode

public ResumeServer ( DBServer $DBServer )
$DBServer DBServer

__construct() public méthode

public __construct ( )

getCachedInstanceTypes() protected méthode

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
Résultat Scalr\Model\Collections\ArrayCollection | boolean Returns collection of the CloudInstanceType entities on success or false otherwise

getConfigVariable() public méthode

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
Résultat string Returns the value of the specified platform property

getContainer() public méthode

Gets DI container
public getContainer ( ) : Container
Résultat Scalr\DependencyInjection\Container Returns DI container

getEndpointUrl() public méthode

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
Résultat string | null Returns endpoint url for private clouds. Null otherwise.

getImageInfo() public méthode

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

getInstanceType() public méthode

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

getOrphanedServers() public méthode

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

hasCloudPrices() public méthode

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

setConfigVariable() public méthode

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
Résultat Scalr\DependencyInjection\Container

$db protected_oe property

protected ADODB_mysqli $db
Résultat ADODB_mysqli

$platform protected_oe property

protected $platform