PHP 클래스 Pantheon\Terminus\Models\Environment

상속: extends TerminusModel, implements Robo\Contract\ConfigAwareInterface, implements League\Container\ContainerAwareInterface, use trait League\Container\ContainerAwareTrait, use trait Robo\Common\ConfigAwareTrait
파일 보기 프로젝트 열기: pantheon-systems/terminus 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$backups Pantheon\Terminus\Collections\Backups
$bindings Pantheon\Terminus\Collections\Bindings
$commits Pantheon\Terminus\Collections\Commits
$domains Pantheon\Terminus\Collections\Domains
$site Site
$workflows Pantheon\Terminus\Collections\Workflows

보호된 프로퍼티들

프로퍼티 타입 설명
$lock Lock

공개 메소드들

메소드 설명
__construct ( object $attributes, array $options = [] ) Object constructor
applyUpstreamUpdates ( boolean $updatedb = true, boolean $xoption = false ) : Workflow Apply upstream updates
cacheserverConnectionInfo ( ) : array Gives cacheserver connection info for this environment
changeConnectionMode ( string $value ) : Workflow | string Changes connection mode
clearCache ( ) : Workflow Clears an environment's cache
cloneDatabase ( string $from_env ) : Workflow Clones database from this environment to another
cloneFiles ( string $from_env ) : Workflow Clones files from this environment to another
commitChanges ( string $commit = null ) : array Commits changes to code
connectionInfo ( ) : array Gives connection info for this environment
convergeBindings ( ) : array Converges all bindings on a site
countDeployableCommits ( ) : integer Counts the number of deployable commits
dashboardUrl ( ) : string Provides Pantheon Dashboard URL for this environment
databaseConnectionInfo ( ) : array Gives database connection info for this environment
delete ( array $arg_options = [] ) : Workflow Delete a multidev environment
deploy ( array $params ) : Workflow Deploys the Test or Live environment
diffstat ( ) : array Gets diff from multidev environment
disableHttpsCertificate ( ) : array Remove a HTTPS certificate from the environment
domain ( ) : string Generate environment URL
getBackups ( ) : Backups
getBindings ( ) : Bindings
getCommits ( ) : Commits
getDomains ( ) : Domains
getDrushVersion ( ) : integer Gets the Drush version of this environment
getLock ( ) : Lock Returns the lock object associated with this environment
getName ( ) : string Returns the environment's name
getParentEnvironment ( ) : Environment Returns the parent environment
getSite ( ) : Site
getWorkflows ( ) : Workflows
gitConnectionInfo ( ) : array Gives Git connection info for this environment
hasDeployableCode ( ) : boolean Decides if the environment has changes to deploy
import ( string $url ) : Workflow Imports a site archive onto Pantheon
importDatabase ( string $url ) : Workflow Imports a database archive
importFiles ( string $url ) : Workflow Imports a file archive
initializeBindings ( ) : Workflow Initializes the test/live environments on a newly created site and clones content from previous environment (e.g. test clones dev content, live clones test content.)
isInitialized ( ) : boolean Have the environment's bindings have been initialized?
isMultidev ( ) : boolean Is this branch a multidev environment?
mergeFromDev ( array $options = [] ) : Workflow Merge code from the Dev Environment into this Multidev Environment
mergeToDev ( array $options = [] ) : Workflow Merge code from a multidev environment into the dev environment
sendCommandViaSsh ( string $command ) : string[] Sends a command to an environment via SSH.
serialize ( ) : array Formats environment object into an associative array for output
setHttpsCertificate ( array $certificate = [] ) Add/replace an HTTPS certificate on the environment
sftpConnectionInfo ( ) : array Gives SFTP connection info for this environment
wake ( ) : array "Wake" a site
wipe ( ) : Workflow Deletes all content (files and database) from the Environment

보호된 메소드들

메소드 설명
parseAttributes ( object $data ) : object Modify response data between fetch and assignment

비공개 메소드들

메소드 설명
settings ( string $setting = null ) : mixed Retrieves the value of an environmental setting

메소드 상세

__construct() 공개 메소드

Object constructor
public __construct ( object $attributes, array $options = [] )
$attributes object Attributes of this model
$options array Options with which to configure this model

applyUpstreamUpdates() 공개 메소드

Apply upstream updates
public applyUpstreamUpdates ( boolean $updatedb = true, boolean $xoption = false ) : Workflow
$updatedb boolean True to run update.php
$xoption boolean True to automatically resolve merge conflicts
리턴 Workflow

cacheserverConnectionInfo() 공개 메소드

Gives cacheserver connection info for this environment
public cacheserverConnectionInfo ( ) : array
리턴 array

changeConnectionMode() 공개 메소드

Changes connection mode
public changeConnectionMode ( string $value ) : Workflow | string
$value string Connection mode, "git" or "sftp"
리턴 Workflow | string

clearCache() 공개 메소드

Clears an environment's cache
public clearCache ( ) : Workflow
리턴 Workflow

cloneDatabase() 공개 메소드

Clones database from this environment to another
public cloneDatabase ( string $from_env ) : Workflow
$from_env string Name of the environment to clone
리턴 Workflow

cloneFiles() 공개 메소드

Clones files from this environment to another
public cloneFiles ( string $from_env ) : Workflow
$from_env string Name of the environment to clone
리턴 Workflow

commitChanges() 공개 메소드

Commits changes to code
public commitChanges ( string $commit = null ) : array
$commit string Should be the commit message to use if committing on server changes
리턴 array Response data

connectionInfo() 공개 메소드

Gives connection info for this environment
public connectionInfo ( ) : array
리턴 array

convergeBindings() 공개 메소드

Converges all bindings on a site
public convergeBindings ( ) : array
리턴 array

countDeployableCommits() 공개 메소드

Counts the number of deployable commits
public countDeployableCommits ( ) : integer
리턴 integer

dashboardUrl() 공개 메소드

Provides Pantheon Dashboard URL for this environment
public dashboardUrl ( ) : string
리턴 string

databaseConnectionInfo() 공개 메소드

Gives database connection info for this environment
public databaseConnectionInfo ( ) : array
리턴 array

delete() 공개 메소드

Delete a multidev environment
public delete ( array $arg_options = [] ) : Workflow
$arg_options array Elements as follow: bool delete_branch True to delete branch
리턴 Workflow

deploy() 공개 메소드

Deploys the Test or Live environment
public deploy ( array $params ) : Workflow
$params array Parameters for the deploy workflow
리턴 Workflow

diffstat() 공개 메소드

Gets diff from multidev environment
public diffstat ( ) : array
리턴 array

disableHttpsCertificate() 공개 메소드

Remove a HTTPS certificate from the environment
public disableHttpsCertificate ( ) : array
리턴 array $workflow

domain() 공개 메소드

Generate environment URL
public domain ( ) : string
리턴 string

getBackups() 공개 메소드

public getBackups ( ) : Backups
리턴 Pantheon\Terminus\Collections\Backups

getBindings() 공개 메소드

public getBindings ( ) : Bindings
리턴 Pantheon\Terminus\Collections\Bindings

getCommits() 공개 메소드

public getCommits ( ) : Commits
리턴 Pantheon\Terminus\Collections\Commits

getDomains() 공개 메소드

public getDomains ( ) : Domains
리턴 Pantheon\Terminus\Collections\Domains

getDrushVersion() 공개 메소드

Gets the Drush version of this environment
public getDrushVersion ( ) : integer
리턴 integer

getLock() 공개 메소드

Returns the lock object associated with this environment
public getLock ( ) : Lock
리턴 Lock

getName() 공개 메소드

Returns the environment's name
public getName ( ) : string
리턴 string

getParentEnvironment() 공개 메소드

Returns the parent environment
public getParentEnvironment ( ) : Environment
리턴 Environment

getSite() 공개 메소드

public getSite ( ) : Site
리턴 Site

getWorkflows() 공개 메소드

public getWorkflows ( ) : Workflows
리턴 Pantheon\Terminus\Collections\Workflows

gitConnectionInfo() 공개 메소드

Gives Git connection info for this environment
public gitConnectionInfo ( ) : array
리턴 array

hasDeployableCode() 공개 메소드

Decides if the environment has changes to deploy
public hasDeployableCode ( ) : boolean
리턴 boolean

import() 공개 메소드

Imports a site archive onto Pantheon
public import ( string $url ) : Workflow
$url string URL of the archive to import
리턴 Workflow

importDatabase() 공개 메소드

Imports a database archive
public importDatabase ( string $url ) : Workflow
$url string URL to import data from
리턴 Workflow

importFiles() 공개 메소드

Imports a file archive
public importFiles ( string $url ) : Workflow
$url string URL to import data from
리턴 Workflow

initializeBindings() 공개 메소드

Initializes the test/live environments on a newly created site and clones content from previous environment (e.g. test clones dev content, live clones test content.)
public initializeBindings ( ) : Workflow
리턴 Workflow In-progress workflow

isInitialized() 공개 메소드

Have the environment's bindings have been initialized?
public isInitialized ( ) : boolean
리턴 boolean True if environment has been instantiated

isMultidev() 공개 메소드

Is this branch a multidev environment?
public isMultidev ( ) : boolean
리턴 boolean True if ths environment is a multidev environment

mergeFromDev() 공개 메소드

Merge code from the Dev Environment into this Multidev Environment
public mergeFromDev ( array $options = [] ) : Workflow
$options array Parameters to override defaults boolean updatedb True to update DB with merge
리턴 Workflow

mergeToDev() 공개 메소드

Merge code from a multidev environment into the dev environment
public mergeToDev ( array $options = [] ) : Workflow
$options array Parameters to override defaults string from_environment Name of the multidev environment to merge boolean updatedb True to update DB with merge
리턴 Workflow

parseAttributes() 보호된 메소드

Modify response data between fetch and assignment
protected parseAttributes ( object $data ) : object
$data object attributes received from API response
리턴 object $data

sendCommandViaSsh() 공개 메소드

Sends a command to an environment via SSH.
public sendCommandViaSsh ( string $command ) : string[]
$command string The command to be run on the platform
리턴 string[] $response Elements as follow: string output The output from the command run string exit_code The status code returned by the command run

serialize() 공개 메소드

Formats environment object into an associative array for output
public serialize ( ) : array
리턴 array Associative array of data for output

setHttpsCertificate() 공개 메소드

Add/replace an HTTPS certificate on the environment
public setHttpsCertificate ( array $certificate = [] )
$certificate array Certificate data elements as follow string cert Certificate string key RSA private key string intermediary CA intermediate certificate(s)

sftpConnectionInfo() 공개 메소드

Gives SFTP connection info for this environment
public sftpConnectionInfo ( ) : array
리턴 array

wake() 공개 메소드

"Wake" a site
public wake ( ) : array
리턴 array

wipe() 공개 메소드

Deletes all content (files and database) from the Environment
public wipe ( ) : Workflow
리턴 Workflow

프로퍼티 상세

$backups 공개적으로 프로퍼티

public Backups,Pantheon\Terminus\Collections $backups
리턴 Pantheon\Terminus\Collections\Backups

$bindings 공개적으로 프로퍼티

public Bindings,Pantheon\Terminus\Collections $bindings
리턴 Pantheon\Terminus\Collections\Bindings

$commits 공개적으로 프로퍼티

public Commits,Pantheon\Terminus\Collections $commits
리턴 Pantheon\Terminus\Collections\Commits

$domains 공개적으로 프로퍼티

public Domains,Pantheon\Terminus\Collections $domains
리턴 Pantheon\Terminus\Collections\Domains

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

protected Lock,Pantheon\Terminus\Models $lock
리턴 Lock

$site 공개적으로 프로퍼티

public Site,Pantheon\Terminus\Models $site
리턴 Site

$workflows 공개적으로 프로퍼티

public Workflows,Pantheon\Terminus\Collections $workflows
리턴 Pantheon\Terminus\Collections\Workflows