PHP Class Rocketeer\Services\Connections\ConnectionsHandler

Author: Maxime Fabre ([email protected])
Inheritance: use trait Rocketeer\Traits\HasLocator
Datei anzeigen Open project: anahkiasen/rocketeer

Protected Properties

Property Type Description
$connection The current connection.
$connections The connections to use.
$currentServer The current server.
$handle The current handle.
$stage The current stage.

Public Methods

Method Description
disconnect ( ) Flush active connection(s).
getAvailableConnections ( ) : string[][] | string[] Get the available connections.
getConnection ( ) : string Get the active connection.
getConnectionCredentials ( string | null $connection = null ) : string[][] Get the credentials for a particular connection.
getConnections ( ) : string[] Get the connection in use.
getHandle ( string | null $connection = null, integer | null $server = null, string | null $stage = null ) : string Build the current connection's handle.
getRepositoryBranch ( ) : string Get the repository branch to use.
getRepositoryCredentials ( ) : array Get the credentials for the repository.
getRepositoryEndpoint ( ) : string Get the URL to the Git repository.
getServer ( ) : integer
getServerCredentials ( string | null $connection = null, integer | null $server = null ) : mixed Get thecredentials for as server.
getStage ( ) : string Get the current stage.
getStages ( ) : array Get the various stages provided by the User.
isMultiserver ( string $connection ) : boolean Check if a connection is multiserver or not.
isValidConnection ( string $connection ) : boolean Check if a connection has credentials related to it.
needsCredentials ( ) : boolean Whether the repository used is using SSH or HTTPS.
setConnection ( string $connection, integer $server ) Set the current connection.
setConnections ( string | string[] $connections ) Set the active connections.
setStage ( string | null $stage ) Set the stage Tasks will execute on.
syncConnectionCredentials ( string | null $connection = null, array $credentials = [], integer $server ) Sync Rocketeer's credentials with Laravel's.

Method Details

disconnect() public method

Flush active connection(s).
public disconnect ( )

getAvailableConnections() public method

Get the available connections.
public getAvailableConnections ( ) : string[][] | string[]
return string[][] | string[]

getConnection() public method

Get the active connection.
public getConnection ( ) : string
return string

getConnectionCredentials() public method

Get the credentials for a particular connection.
public getConnectionCredentials ( string | null $connection = null ) : string[][]
$connection string | null
return string[][]

getConnections() public method

Get the connection in use.
public getConnections ( ) : string[]
return string[]

getHandle() public method

Build the current connection's handle.
public getHandle ( string | null $connection = null, integer | null $server = null, string | null $stage = null ) : string
$connection string | null
$server integer | null
$stage string | null
return string

getRepositoryBranch() public method

Get the repository branch to use.
public getRepositoryBranch ( ) : string
return string

getRepositoryCredentials() public method

Get the credentials for the repository.
public getRepositoryCredentials ( ) : array
return array

getRepositoryEndpoint() public method

Get the URL to the Git repository.
public getRepositoryEndpoint ( ) : string
return string

getServer() public method

public getServer ( ) : integer
return integer

getServerCredentials() public method

Get thecredentials for as server.
public getServerCredentials ( string | null $connection = null, integer | null $server = null ) : mixed
$connection string | null
$server integer | null
return mixed

getStage() public method

Get the current stage.
public getStage ( ) : string
return string

getStages() public method

Get the various stages provided by the User.
public getStages ( ) : array
return array

isMultiserver() public method

Check if a connection is multiserver or not.
public isMultiserver ( string $connection ) : boolean
$connection string
return boolean

isValidConnection() public method

Check if a connection has credentials related to it.
public isValidConnection ( string $connection ) : boolean
$connection string
return boolean

needsCredentials() public method

Whether the repository used is using SSH or HTTPS.
public needsCredentials ( ) : boolean
return boolean

setConnection() public method

Set the current connection.
public setConnection ( string $connection, integer $server )
$connection string
$server integer

setConnections() public method

Set the active connections.
public setConnections ( string | string[] $connections )
$connections string | string[]

setStage() public method

Set the stage Tasks will execute on.
public setStage ( string | null $stage )
$stage string | null

syncConnectionCredentials() public method

Sync Rocketeer's credentials with Laravel's.
public syncConnectionCredentials ( string | null $connection = null, array $credentials = [], integer $server )
$connection string | null
$credentials array
$server integer

Property Details

$connection protected_oe property

The current connection.
protected $connection

$connections protected_oe property

The connections to use.
protected $connections

$currentServer protected_oe property

The current server.
protected $currentServer

$handle protected_oe property

The current handle.
protected $handle

$stage protected_oe property

The current stage.
protected $stage