PHP Class Scalr\Model\Entity\Script

Since: 5.0 (08.05.2014)
Author: Igor Vodiasov ([email protected])
Inheritance: extends Scalr\Model\AbstractEntity
ファイルを表示 Open project: scalr/scalr Class Usage Examples

Public Properties

Property Type Description
$accountId integer The identifier of the client's account
$allowScriptParameters integer Enable/disable script parameters interpolation
$createdByEmail string
$createdById integer
$description string Description
$dtChanged DateTime Date when script was modified last time
$dtCreated DateTime Date when script was created
$envId integer The identifier of the client's environment
$id integer ID
$isSync integer Sync or async script
$name string Script's name
$os string OS family of script (linux, windows)
$timeout integer Timeout

Public Methods

Method Description
__construct ( ) Constructor
checkPermission ( Scalr_Account_User $user, integer $envId )
delete ( ) Deletes this script
fetchVariables ( $content )
fetchVersions ( ) : ArrayObject Fetches list of the versions associated with the script (refreshes)
fork ( string $name, Scalr_Account_Use\Scalr_Account_User $user, integer $envId = null ) : Script Forks specified script into new script
getLatestVersion ( ) : Scalr\Model\Entity\ScriptVersion Get latest version of script
getList ( $accountId, $envId )
getScope ( )
getScriptingData ( $accountId, $envId )
getVersion ( integer $version ) : Scalr\Model\Entity\ScriptVersion | null Gets entity of specified version of script
getVersions ( boolean $resetCache = false ) : ArrayObject Gets the list of the revisions associated with the script
hasAccessPermissions ( $user, $environment = null, $modify = null )
hasVariables ( $content )
save ( ) Saves changes, if script already exists, or saves new script

Method Details

__construct() public method

Constructor
public __construct ( )

checkPermission() public method

public checkPermission ( Scalr_Account_User $user, integer $envId )
$user Scalr_Account_User
$envId integer

delete() public method

Deletes this script
public delete ( )

fetchVariables() public static method

public static fetchVariables ( $content )

fetchVersions() public method

Fetches list of the versions associated with the script (refreshes)
public fetchVersions ( ) : ArrayObject
return ArrayObject Returns the list of ScriptVersion objects

fork() public method

Forks specified script into new script
public fork ( string $name, Scalr_Account_Use\Scalr_Account_User $user, integer $envId = null ) : Script
$name string New script name
$user Scalr_Account_Use\Scalr_Account_User User performs a fork
$envId integer Environment of the new script
return Script Forked script

getLatestVersion() public method

Get latest version of script
public getLatestVersion ( ) : Scalr\Model\Entity\ScriptVersion
return Scalr\Model\Entity\ScriptVersion

getList() public static method

public static getList ( $accountId, $envId )

getScope() public method

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

getScriptingData() public static method

public static getScriptingData ( $accountId, $envId )

getVersion() public method

Gets entity of specified version of script
public getVersion ( integer $version ) : Scalr\Model\Entity\ScriptVersion | null
$version integer
return Scalr\Model\Entity\ScriptVersion | null

getVersions() public method

Gets the list of the revisions associated with the script
public getVersions ( boolean $resetCache = false ) : ArrayObject
$resetCache boolean
return ArrayObject Returns the list of ScriptVersion objects

hasAccessPermissions() public method

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

hasVariables() public static method

public static hasVariables ( $content )

save() public method

Saves changes, if script already exists, or saves new script
public save ( )

Property Details

$accountId public_oe property

The identifier of the client's account
public int $accountId
return integer

$allowScriptParameters public_oe property

Enable/disable script parameters interpolation
public int $allowScriptParameters
return integer

$createdByEmail public_oe property

public string $createdByEmail
return string

$createdById public_oe property

public int $createdById
return integer

$description public_oe property

Description
public string $description
return string

$dtChanged public_oe property

Date when script was modified last time
public DateTime $dtChanged
return DateTime

$dtCreated public_oe property

Date when script was created
public DateTime $dtCreated
return DateTime

$envId public_oe property

The identifier of the client's environment
public int $envId
return integer

$id public_oe property

ID
public int $id
return integer

$isSync public_oe property

Sync or async script
public int $isSync
return integer

$name public_oe property

Script's name
public string $name
return string

$os public_oe property

OS family of script (linux, windows)
public string $os
return string

$timeout public_oe property

Timeout
public int $timeout
return integer