PHP Class Scalr\Model\Entity\Image

Since: 5.0 (23.05.2014)
Author: Igor Vodiasov ([email protected])
Inheritance: extends Scalr\Model\AbstractEntity, implements Scalr\DataType\ScopeInterface, implements Scalr\DataType\AccessPermissionsInterface
Afficher le fichier Open project: scalr/scalr Class Usage Examples

Méthodes publiques

Свойство Type Description
$accountId integer
$agentVersion string
$architecture string
$bundleTaskId integer
$cloudLocation string
$createdByEmail string
$createdById integer
$dtAdded DateTime
$dtLastUsed DateTime
$envId integer
$hasCloudInit integer
$hash string Hash (primary key)
$id string Image ID
$isDeprecated boolean
$isScalarized integer
$name string
$osId string
$platform string
$size integer
$source string
$status string
$statusError string
$type string

Protected Properties

Свойство Type Description
$_environment Scalr_Environment

Méthodes publiques

Méthode Description
__construct ( )
checkImage ( ) : boolean | array Check if image exists and return more info if special data exists
deleteCloudImage ( )
getDtAdded ( ) : DateTim\DateTime | null Gets normalized dtAdded
getEnvironment ( ) : null | Scalr_Environmen\Scalr_Environment Return NULL, if image is owned by admin
getOs ( ) : Scalr\Model\Entity\Os
getPlatforms ( integer $accountId, integer $envId ) : array Get array of image's platforms
getScope ( )
getSoftware ( ) : array
getSoftwareAsString ( ) : string
getUsed ( integer $accountId = null, integer $envId = null ) : array | false Get image's usage in this environment (servers, roles)
hasAccessPermissions ( $user, $environment = null, $modify = null )
isEc2EbsImage ( ) : boolean
isEc2HvmImage ( ) : boolean
isEc2InstanceStoreImage ( ) : boolean
isUsedGlobal ( ) : boolean If image is used in any environment (servers, farmRoles) or had duplicates in another environments
migrateEc2Location ( string $cloudLocation, Scalr_Account_User | User $user ) : Image Migrates an Image to another Cloud Location
save ( )
setSoftware ( array $props )

Method Details

__construct() public méthode

public __construct ( )

checkImage() public méthode

Check if image exists and return more info if special data exists
public checkImage ( ) : boolean | array
Résultat boolean | array Returns array of data if exists when update is required

deleteCloudImage() public méthode

public deleteCloudImage ( )

getDtAdded() public méthode

Gets normalized dtAdded
public getDtAdded ( ) : DateTim\DateTime | null
Résultat DateTim\DateTime | null

getEnvironment() public méthode

Return NULL, if image is owned by admin
public getEnvironment ( ) : null | Scalr_Environmen\Scalr_Environment
Résultat null | Scalr_Environmen\Scalr_Environment

getOs() public méthode

public getOs ( ) : Scalr\Model\Entity\Os
Résultat Scalr\Model\Entity\Os

getPlatforms() public static méthode

Get array of image's platforms
public static getPlatforms ( integer $accountId, integer $envId ) : array
$accountId integer
$envId integer
Résultat array Array of platform's names

getScope() public méthode

See also: Scalr\DataType\ScopeInterface::getScope()
public getScope ( )

getSoftware() public méthode

public getSoftware ( ) : array
Résultat array

getSoftwareAsString() public méthode

public getSoftwareAsString ( ) : string
Résultat string

getUsed() public méthode

Get image's usage in this environment (servers, roles)
public getUsed ( integer $accountId = null, integer $envId = null ) : array | false
$accountId integer optional
$envId integer optional
Résultat array | false Return array of [rolesCount, serversCount] or FALSE on failure

hasAccessPermissions() public méthode

See also: Scalr\DataType\AccessPermissionsInterface::hasAccessPermissions()
public hasAccessPermissions ( $user, $environment = null, $modify = null )

isEc2EbsImage() public méthode

public isEc2EbsImage ( ) : boolean
Résultat boolean Return TRUE if image is ebs based

isEc2HvmImage() public méthode

public isEc2HvmImage ( ) : boolean
Résultat boolean Return TRUE if image is hvm

isEc2InstanceStoreImage() public méthode

public isEc2InstanceStoreImage ( ) : boolean
Résultat boolean Return TRUE if image is instance-store based

isUsedGlobal() public méthode

If image is used in any environment (servers, farmRoles) or had duplicates in another environments
public isUsedGlobal ( ) : boolean
Résultat boolean

migrateEc2Location() public méthode

Migrates an Image to another Cloud Location
public migrateEc2Location ( string $cloudLocation, Scalr_Account_User | User $user ) : Image
$cloudLocation string The cloud location
$user Scalr_Account_User | Scalr\Model\Entity\Account\User The user object
Résultat Image

save() public méthode

public save ( )

setSoftware() public méthode

public setSoftware ( array $props )
$props array

Property Details

$_environment protected_oe property

protected Scalr_Environment $_environment
Résultat Scalr_Environment

$accountId public_oe property

public int $accountId
Résultat integer

$agentVersion public_oe property

public string $agentVersion
Résultat string

$architecture public_oe property

public string $architecture
Résultat string

$bundleTaskId public_oe property

public int $bundleTaskId
Résultat integer

$cloudLocation public_oe property

public string $cloudLocation
Résultat string

$createdByEmail public_oe property

public string $createdByEmail
Résultat string

$createdById public_oe property

public int $createdById
Résultat integer

$dtAdded public_oe property

public DateTime $dtAdded
Résultat DateTime

$dtLastUsed public_oe property

public DateTime $dtLastUsed
Résultat DateTime

$envId public_oe property

public int $envId
Résultat integer

$hasCloudInit public_oe property

public int $hasCloudInit
Résultat integer

$hash public_oe property

Hash (primary key)
public string $hash
Résultat string

$id public_oe property

Image ID
public string $id
Résultat string

$isDeprecated public_oe property

public bool $isDeprecated
Résultat boolean

$isScalarized public_oe property

public int $isScalarized
Résultat integer

$name public_oe property

public string $name
Résultat string

$osId public_oe property

public string $osId
Résultat string

$platform public_oe property

public string $platform
Résultat string

$size public_oe property

public int $size
Résultat integer

$source public_oe property

public string $source
Résultat string

$status public_oe property

public string $status
Résultat string

$statusError public_oe property

public string $statusError
Résultat string

$type public_oe property

public string $type
Résultat string