PHP 클래스 Scalr\Model\Entity\Image

부터: 5.0 (23.05.2014)
저자: Igor Vodiasov ([email protected])
상속: extends Scalr\Model\AbstractEntity, implements Scalr\DataType\ScopeInterface, implements Scalr\DataType\AccessPermissionsInterface
파일 보기 프로젝트 열기: scalr/scalr 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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

보호된 프로퍼티들

프로퍼티 타입 설명
$_environment Scalr_Environment

공개 메소드들

메소드 설명
__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 )

메소드 상세

__construct() 공개 메소드

public __construct ( )

checkImage() 공개 메소드

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

deleteCloudImage() 공개 메소드

public deleteCloudImage ( )

getDtAdded() 공개 메소드

Gets normalized dtAdded
public getDtAdded ( ) : DateTim\DateTime | null
리턴 DateTim\DateTime | null

getEnvironment() 공개 메소드

Return NULL, if image is owned by admin
public getEnvironment ( ) : null | Scalr_Environmen\Scalr_Environment
리턴 null | Scalr_Environmen\Scalr_Environment

getOs() 공개 메소드

public getOs ( ) : Scalr\Model\Entity\Os
리턴 Scalr\Model\Entity\Os

getPlatforms() 공개 정적인 메소드

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

getScope() 공개 메소드

또한 보기: Scalr\DataType\ScopeInterface::getScope()
public getScope ( )

getSoftware() 공개 메소드

public getSoftware ( ) : array
리턴 array

getSoftwareAsString() 공개 메소드

public getSoftwareAsString ( ) : string
리턴 string

getUsed() 공개 메소드

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
리턴 array | false Return array of [rolesCount, serversCount] or FALSE on failure

hasAccessPermissions() 공개 메소드

또한 보기: Scalr\DataType\AccessPermissionsInterface::hasAccessPermissions()
public hasAccessPermissions ( $user, $environment = null, $modify = null )

isEc2EbsImage() 공개 메소드

public isEc2EbsImage ( ) : boolean
리턴 boolean Return TRUE if image is ebs based

isEc2HvmImage() 공개 메소드

public isEc2HvmImage ( ) : boolean
리턴 boolean Return TRUE if image is hvm

isEc2InstanceStoreImage() 공개 메소드

public isEc2InstanceStoreImage ( ) : boolean
리턴 boolean Return TRUE if image is instance-store based

isUsedGlobal() 공개 메소드

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

migrateEc2Location() 공개 메소드

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
리턴 Image

save() 공개 메소드

public save ( )

setSoftware() 공개 메소드

public setSoftware ( array $props )
$props array

프로퍼티 상세

$_environment 보호되어 있는 프로퍼티

protected Scalr_Environment $_environment
리턴 Scalr_Environment

$accountId 공개적으로 프로퍼티

public int $accountId
리턴 integer

$agentVersion 공개적으로 프로퍼티

public string $agentVersion
리턴 string

$architecture 공개적으로 프로퍼티

public string $architecture
리턴 string

$bundleTaskId 공개적으로 프로퍼티

public int $bundleTaskId
리턴 integer

$cloudLocation 공개적으로 프로퍼티

public string $cloudLocation
리턴 string

$createdByEmail 공개적으로 프로퍼티

public string $createdByEmail
리턴 string

$createdById 공개적으로 프로퍼티

public int $createdById
리턴 integer

$dtAdded 공개적으로 프로퍼티

public DateTime $dtAdded
리턴 DateTime

$dtLastUsed 공개적으로 프로퍼티

public DateTime $dtLastUsed
리턴 DateTime

$envId 공개적으로 프로퍼티

public int $envId
리턴 integer

$hasCloudInit 공개적으로 프로퍼티

public int $hasCloudInit
리턴 integer

$hash 공개적으로 프로퍼티

Hash (primary key)
public string $hash
리턴 string

$id 공개적으로 프로퍼티

Image ID
public string $id
리턴 string

$isDeprecated 공개적으로 프로퍼티

public bool $isDeprecated
리턴 boolean

$isScalarized 공개적으로 프로퍼티

public int $isScalarized
리턴 integer

$name 공개적으로 프로퍼티

public string $name
리턴 string

$osId 공개적으로 프로퍼티

public string $osId
리턴 string

$platform 공개적으로 프로퍼티

public string $platform
리턴 string

$size 공개적으로 프로퍼티

public int $size
리턴 integer

$source 공개적으로 프로퍼티

public string $source
리턴 string

$status 공개적으로 프로퍼티

public string $status
리턴 string

$statusError 공개적으로 프로퍼티

public string $statusError
리턴 string

$type 공개적으로 프로퍼티

public string $type
리턴 string