PHP 클래스 Scalr\Model\Entity\Server

저자: N.V.
상속: extends Scalr\Model\AbstractEntity, implements Scalr\DataType\AccessPermissionsInterface
파일 보기 프로젝트 열기: scalr/scalr 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$accountId integer Identifier of the Client's Account
$added DateTime Added time
$cloudLocation string Server cloud location
$cloudLocationZone string Zone a cloud is located
$envId integer Environment identifier
$farmId integer Farm identifier
$farmIndex integer Index within the Farm
$farmRoleId integer Identifier for the role in a farm
$id integer The identifier of the Server
$imageId string Image identifier
$index integer Index within the Farm Role
$initialized DateTime Initialized time
$instanceTypeName string Server instance type name
$lastSync DateTime Time the synchronization occured last
$localIp string Server local Ip
$os string Server OS type
$platform string Server platform
$rebootStart DateTime Time when server has been either rebooted or started
$remoteIp string Server remote Ip
$scalarized boolean Whether server is scalarized
$serverId string Server unique identifier
$shutdownScheduled DateTime Sheduled time for shutdown
$status string Status of a server
$type string Server instance type

보호된 프로퍼티들

프로퍼티 타입 설명
$_environment Scalr\Model\Entity\Account\Environment
$_farm Farm
$_farmRole FarmRole
$_image Image
$_properties Scalr\Model\Collections\SettingsCollection Server properties collection
$_scalarizr Scalr_Net_Scalarizr_Client
$_scalarizrUpdateClient Scalr_Net_Scalarizr_UpdateClient
$_serverHistory Scalr\Model\Entity\Server\History

공개 메소드들

메소드 설명
__get ( string $name ) : mixed Magic getter
__getDBServer ( ) : DBServer Gets old model from entity
__getEntityFromDBServer ( DBServer $DBServer ) : Server Gets entity from old model
delete ( )
findPk ( $serverId ) : mixed Temporary solution until we make serverId as primary key
findWithProperties ( array $criteria = null, array $group = null, array $order = null, integer $limit = null, integer $offset = null, boolean $countRecords = null ) : ArrayCollection | Server[] Searches servers by criteria and selecting and initiating their Properties
getEnvironment ( ) : Environment | null Get Environment entity
getFarm ( ) : Farm | null Get Farm entity
getFarmRole ( ) : FarmRole | null Get FarmRole entity
getHistory ( ) : Scalr\Model\Entity\Server\History Gets server history entity
getImage ( ) : Image | null Get Image entity
getImportantPropertyList ( ) : array Gets a list of important properties which must not be deleted
getPort ( string $portType ) : integer Gets port
getSettingCriteria ( string $name, string $value = null, array $criteria = null ) : array Gets filter criteria by the setting
getTerminateReason ( integer $reasonId ) : string Gets terminate reason
hasAccessPermissions ( $user, $environment = null, $modify = null )
isVersionSupported ( string $v ) : boolean Check if given version is less than scalarizr version
reboot ( boolean $hard = false ) Reboot action
resume ( ) Resume action
save ( )
setFreeFarmIndex ( ) Set free farm index for new server
setFreeFarmRoleIndex ( ) Set free farm role index for new server
setOs ( string $osType ) : Server Sets OS type
setTimeLog ( string $field, integer $secondsSinceBoot = null, integer $secondsSinceStart = null ) : boolean Add record for servers_launch_timelog
suspend ( User $user = null ) : boolean Marks server as to be suspended.
terminate ( integer | array $reason, boolean $forcefully = null, User $user = null ) : boolean Marks server as to be terminated.
updateStatus ( string $serverStatus ) : Server Updates Server status
versionInfo ( string $v ) : int[] Parses version info into machine representation

메소드 상세

__get() 공개 메소드

Magic getter
public __get ( string $name ) : mixed
$name string Name of property that is accessed
리턴 mixed Returns property value

__getDBServer() 공개 메소드

Gets old model from entity
public __getDBServer ( ) : DBServer
리턴 DBServer

__getEntityFromDBServer() 공개 메소드

Gets entity from old model
public __getEntityFromDBServer ( DBServer $DBServer ) : Server
$DBServer DBServer Db server object
리턴 Server

delete() 공개 메소드

또한 보기: AbstractEntity::delete()
public delete ( )

findPk() 공개 정적인 메소드

Temporary solution until we make serverId as primary key
public static findPk ( $serverId ) : mixed
$serverId
리턴 mixed

findWithProperties() 공개 정적인 메소드

Searches servers by criteria and selecting and initiating their Properties
public static findWithProperties ( array $criteria = null, array $group = null, array $order = null, integer $limit = null, integer $offset = null, boolean $countRecords = null ) : ArrayCollection | Server[]
$criteria array optional The search criteria.
$group array optional The group by looks like [property1, ...], by default groups by `serverId`
$order array optional The results order looks like [property1 => true|false, ... ]
$limit integer optional The records limit
$offset integer optional The offset
$countRecords boolean optional True to calculate total number of the records without limit
리턴 Scalr\Model\Collections\ArrayCollection | Server[] Returns collection of the entities.

getEnvironment() 공개 메소드

Get Environment entity
public getEnvironment ( ) : Environment | null
리턴 Scalr\Model\Entity\Account\Environment | null Return Environment entity or null

getFarm() 공개 메소드

Get Farm entity
public getFarm ( ) : Farm | null
리턴 Farm | null Returns the Farm entity which is associated with the Server or null otherwise

getFarmRole() 공개 메소드

Get FarmRole entity
public getFarmRole ( ) : FarmRole | null
리턴 FarmRole | null Returns the FarmRole entity which is associated with the Server or null otherwise

getHistory() 공개 메소드

Gets server history entity
public getHistory ( ) : Scalr\Model\Entity\Server\History
리턴 Scalr\Model\Entity\Server\History Returns server history entity

getImage() 공개 메소드

Get Image entity
public getImage ( ) : Image | null
리턴 Image | null Return Image entity or null

getImportantPropertyList() 공개 정적인 메소드

Gets a list of important properties which must not be deleted
public static getImportantPropertyList ( ) : array
리턴 array Returns array of properties

getPort() 공개 메소드

Gets port
public getPort ( string $portType ) : integer
$portType string
리턴 integer

getSettingCriteria() 공개 메소드

Gets filter criteria by the setting
public getSettingCriteria ( string $name, string $value = null, array $criteria = null ) : array
$name string Setting name
$value string optional Setting value
$criteria array optional Criteria, if already exists
리턴 array Returns extended criteria

getTerminateReason() 공개 정적인 메소드

Gets terminate reason
public static getTerminateReason ( integer $reasonId ) : string
$reasonId integer Reason id
리턴 string

hasAccessPermissions() 공개 메소드

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

isVersionSupported() 공개 메소드

Check if given version is less than scalarizr version
public isVersionSupported ( string $v ) : boolean
$v string Version
리턴 boolean

reboot() 공개 메소드

Reboot action
public reboot ( boolean $hard = false )
$hard boolean optional Method: Hard (true) | Soft (false)

resume() 공개 메소드

Resume action
public resume ( )

save() 공개 메소드

또한 보기: AbstractEntity::save()
public save ( )

setFreeFarmIndex() 공개 메소드

Set free farm index for new server
public setFreeFarmIndex ( )

setFreeFarmRoleIndex() 공개 메소드

Set free farm role index for new server

setOs() 공개 메소드

Sets OS type
public setOs ( string $osType ) : Server
$osType string Operating System type (linux/windows)
리턴 Server

setTimeLog() 공개 메소드

Add record for servers_launch_timelog
public setTimeLog ( string $field, integer $secondsSinceBoot = null, integer $secondsSinceStart = null ) : boolean
$field string Field name which we should update
$secondsSinceBoot integer optional Seconds since boot. Field is used for field ts_hi If field is ts_launched, ts_hi, ts_bhu, ts_hu, value could be used as timestamp
$secondsSinceStart integer optional Seconds since start. Field is used for field ts_hi
리턴 boolean

suspend() 공개 메소드

Marks server as to be suspended.
public suspend ( User $user = null ) : boolean
$user Scalr\Model\Entity\Account\User optional The user entity
리턴 boolean

terminate() 공개 메소드

Marks server as to be terminated.
public terminate ( integer | array $reason, boolean $forcefully = null, User $user = null ) : boolean
$reason integer | array The reason possibly with the format parameters.
$forcefully boolean optional Method: forcefully (true) | gracefully (false)
$user Scalr\Model\Entity\Account\User optional The user entity
리턴 boolean

updateStatus() 공개 메소드

Updates Server status
public updateStatus ( string $serverStatus ) : Server
$serverStatus string The status
리턴 Server

versionInfo() 공개 정적인 메소드

Parses version info into machine representation
public static versionInfo ( string $v ) : int[]
$v string String representation of a version
리턴 int[]

프로퍼티 상세

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

protected Environment,Scalr\Model\Entity\Account $_environment
리턴 Scalr\Model\Entity\Account\Environment

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

protected Farm,Scalr\Model\Entity $_farm
리턴 Farm

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

protected FarmRole,Scalr\Model\Entity $_farmRole
리턴 FarmRole

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

protected Image,Scalr\Model\Entity $_image
리턴 Image

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

Server properties collection
protected SettingsCollection,Scalr\Model\Collections $_properties
리턴 Scalr\Model\Collections\SettingsCollection

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

protected Scalr_Net_Scalarizr_Client $_scalarizr
리턴 Scalr_Net_Scalarizr_Client

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

protected Scalr_Net_Scalarizr_UpdateClient $_scalarizrUpdateClient
리턴 Scalr_Net_Scalarizr_UpdateClient

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

protected History,Scalr\Model\Entity\Server $_serverHistory
리턴 Scalr\Model\Entity\Server\History

$accountId 공개적으로 프로퍼티

Identifier of the Client's Account
public int $accountId
리턴 integer

$added 공개적으로 프로퍼티

Added time
public DateTime $added
리턴 DateTime

$cloudLocation 공개적으로 프로퍼티

Server cloud location
public string $cloudLocation
리턴 string

$cloudLocationZone 공개적으로 프로퍼티

Zone a cloud is located
public string $cloudLocationZone
리턴 string

$envId 공개적으로 프로퍼티

Environment identifier
public int $envId
리턴 integer

$farmId 공개적으로 프로퍼티

Farm identifier
public int $farmId
리턴 integer

$farmIndex 공개적으로 프로퍼티

Index within the Farm
public int $farmIndex
리턴 integer

$farmRoleId 공개적으로 프로퍼티

Identifier for the role in a farm
public int $farmRoleId
리턴 integer

$id 공개적으로 프로퍼티

The identifier of the Server
public int $id
리턴 integer

$imageId 공개적으로 프로퍼티

Image identifier
public string $imageId
리턴 string

$index 공개적으로 프로퍼티

Index within the Farm Role
public int $index
리턴 integer

$initialized 공개적으로 프로퍼티

Initialized time
public DateTime $initialized
리턴 DateTime

$instanceTypeName 공개적으로 프로퍼티

Server instance type name
public string $instanceTypeName
리턴 string

$lastSync 공개적으로 프로퍼티

Time the synchronization occured last
public DateTime $lastSync
리턴 DateTime

$localIp 공개적으로 프로퍼티

Server local Ip
public string $localIp
리턴 string

$os 공개적으로 프로퍼티

Server OS type
public string $os
리턴 string

$platform 공개적으로 프로퍼티

Server platform
public string $platform
리턴 string

$rebootStart 공개적으로 프로퍼티

Time when server has been either rebooted or started
public DateTime $rebootStart
리턴 DateTime

$remoteIp 공개적으로 프로퍼티

Server remote Ip
public string $remoteIp
리턴 string

$scalarized 공개적으로 프로퍼티

Whether server is scalarized
public bool $scalarized
리턴 boolean

$serverId 공개적으로 프로퍼티

Server unique identifier
public string $serverId
리턴 string

$shutdownScheduled 공개적으로 프로퍼티

Sheduled time for shutdown
public DateTime $shutdownScheduled
리턴 DateTime

$status 공개적으로 프로퍼티

Status of a server
public string $status
리턴 string

$type 공개적으로 프로퍼티

Server instance type
public string $type
리턴 string