PHP Class Collective\Remote\RemoteManager

Show file Open project: laravelcollective/remote Class Usage Examples

Protected Properties

Property Type Description
$app Illuminate\Contracts\Container\Container The application instance.

Public Methods

Method Description
__call ( string $method, array $parameters ) : mixed Dynamically pass methods to the default connection.
__construct ( Illuminate\Contracts\Container\Container $app ) Create a new remote manager instance.
connect ( array $config ) : Collective\Remote\Connection Make a new connection instance based on passed params.
connection ( string | array $name = null ) : Collective\Remote\ConnectionInterface Get a remote connection instance.
getDefaultConnection ( ) : string Get the default connection name.
group ( string $name ) : Collective\Remote\ConnectionInterface Get a connection group instance by name.
into ( string | array | mixed $name ) : Collective\Remote\ConnectionInterface Get a remote connection instance.
multiple ( array $names ) : Collective\Remote\MultiConnection Resolve a multiple connection instance.
resolve ( string $name ) : Collective\Remote\Connection Resolve a remote connection instance.
setDefaultConnection ( string $name ) : void Set the default connection name.

Protected Methods

Method Description
getAuth ( array $config ) : array Format the appropriate authentication array payload.
getConfig ( string $name ) : array Get the configuration for a remote server.
makeConnection ( string $name, array $config ) : Collective\Remote\Connection Make a new connection instance.
setOutput ( Collective\Remote\Connection $connection ) : void Set the output implementation on the connection.

Method Details

__call() public method

Dynamically pass methods to the default connection.
public __call ( string $method, array $parameters ) : mixed
$method string
$parameters array
return mixed

__construct() public method

Create a new remote manager instance.
public __construct ( Illuminate\Contracts\Container\Container $app )
$app Illuminate\Contracts\Container\Container

connect() public method

Make a new connection instance based on passed params.
public connect ( array $config ) : Collective\Remote\Connection
$config array
return Collective\Remote\Connection

connection() public method

Get a remote connection instance.
public connection ( string | array $name = null ) : Collective\Remote\ConnectionInterface
$name string | array
return Collective\Remote\ConnectionInterface

getAuth() protected method

Format the appropriate authentication array payload.
protected getAuth ( array $config ) : array
$config array
return array

getConfig() protected method

Get the configuration for a remote server.
protected getConfig ( string $name ) : array
$name string
return array

getDefaultConnection() public method

Get the default connection name.
public getDefaultConnection ( ) : string
return string

group() public method

Get a connection group instance by name.
public group ( string $name ) : Collective\Remote\ConnectionInterface
$name string
return Collective\Remote\ConnectionInterface

into() public method

Get a remote connection instance.
public into ( string | array | mixed $name ) : Collective\Remote\ConnectionInterface
$name string | array | mixed
return Collective\Remote\ConnectionInterface

makeConnection() protected method

Make a new connection instance.
protected makeConnection ( string $name, array $config ) : Collective\Remote\Connection
$name string
$config array
return Collective\Remote\Connection

multiple() public method

Resolve a multiple connection instance.
public multiple ( array $names ) : Collective\Remote\MultiConnection
$names array
return Collective\Remote\MultiConnection

resolve() public method

Resolve a remote connection instance.
public resolve ( string $name ) : Collective\Remote\Connection
$name string
return Collective\Remote\Connection

setDefaultConnection() public method

Set the default connection name.
public setDefaultConnection ( string $name ) : void
$name string
return void

setOutput() protected method

Set the output implementation on the connection.
protected setOutput ( Collective\Remote\Connection $connection ) : void
$connection Collective\Remote\Connection
return void

Property Details

$app protected property

The application instance.
protected Container,Illuminate\Contracts\Container $app
return Illuminate\Contracts\Container\Container