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
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$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

Защищенные свойства (Protected)

Свойство Тип Описание
$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