PHP Class Scalr\Model\Entity\Script

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

Méthodes publiques

Свойство 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

Méthodes publiques

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

Constructor
public __construct ( )

checkPermission() public méthode

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

delete() public méthode

Deletes this script
public delete ( )

fetchVariables() public static méthode

public static fetchVariables ( $content )

fetchVersions() public méthode

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

fork() public méthode

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
Résultat Script Forked script

getLatestVersion() public méthode

Get latest version of script
public getLatestVersion ( ) : Scalr\Model\Entity\ScriptVersion
Résultat Scalr\Model\Entity\ScriptVersion

getList() public static méthode

public static getList ( $accountId, $envId )

getScope() public méthode

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

getScriptingData() public static méthode

public static getScriptingData ( $accountId, $envId )

getVersion() public méthode

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

getVersions() public méthode

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

hasAccessPermissions() public méthode

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

hasVariables() public static méthode

public static hasVariables ( $content )

save() public méthode

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
Résultat integer

$allowScriptParameters public_oe property

Enable/disable script parameters interpolation
public int $allowScriptParameters
Résultat integer

$createdByEmail public_oe property

public string $createdByEmail
Résultat string

$createdById public_oe property

public int $createdById
Résultat integer

$description public_oe property

Description
public string $description
Résultat string

$dtChanged public_oe property

Date when script was modified last time
public DateTime $dtChanged
Résultat DateTime

$dtCreated public_oe property

Date when script was created
public DateTime $dtCreated
Résultat DateTime

$envId public_oe property

The identifier of the client's environment
public int $envId
Résultat integer

$id public_oe property

ID
public int $id
Résultat integer

$isSync public_oe property

Sync or async script
public int $isSync
Résultat integer

$name public_oe property

Script's name
public string $name
Résultat string

$os public_oe property

OS family of script (linux, windows)
public string $os
Résultat string

$timeout public_oe property

Timeout
public int $timeout
Résultat integer