GravityKit\GravityExport\Save\Service\ConnectionManagerService
Service that handles testing of storage services' connection.
Since: 1.0
Source: add-ons/save/src/Service/ConnectionManagerService.php:31
Details
- Kind:
class - Namespace:
GravityKit\GravityExport\Save\Service
Methods
| Method | Description |
|---|---|
__construct() | |
getFtpAdapter() | Returns FTP connection adapter. |
getSftpAdapter() | Returns SFTP connection adapter. |
getDropboxAdapter() | Returns Dropbox connection adapter. |
testConnection() | Tests connection: 1) logging in/listing folder, 2) uploading file, 3) deleting file. |
Method Reference
__construct()
public function __construct( PasswordService $password_service )
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$password_service | PasswordService |
Since: 1.0
Source: add-ons/save/src/Service/ConnectionManagerService.php:61
getFtpAdapter()
public function getFtpAdapter( string $host, int $port, bool $ssl, bool $passive, string $username, string $password, string $path, $timeout=null ): FtpAdapter
Returns FTP connection adapter.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$host | string | ||
$port | int | ||
$ssl | bool | ||
$passive | bool | ||
$username | string | ||
$password | string | ||
$path | string | ||
$timeout | null | null |
Returns
FtpAdapter
Since: 1.0
Source: add-ons/save/src/Service/ConnectionManagerService.php:85
getSftpAdapter()
public function getSftpAdapter( string $host, int $port, string $username, string $password, string $path, string $private_key=null, string $private_key_passphrase=null, $timeout=null ): SftpAdapter
Returns SFTP connection adapter.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$host | string | ||
$port | int | ||
$username | string | ||
$password | string | ||
$path | string | ||
$private_key | string | null | null | |
$private_key_passphrase | string | null | null | |
$timeout | null | null |
Returns
SftpAdapter
Since: 1.0
Source: add-ons/save/src/Service/ConnectionManagerService.php:127
getDropboxAdapter()
public function getDropboxAdapter( TokenProvider $token_provider, string $path='' ): DropboxAdapter
Returns Dropbox connection adapter.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$token_provider | TokenProvider | ||
$path | string | '' |
Returns
DropboxAdapter
Since: 1.0
Source: add-ons/save/src/Service/ConnectionManagerService.php:159
testConnection()
public function testConnection( string $service, array $connection_settings ): void
Tests connection: 1) logging in/listing folder, 2) uploading file, 3) deleting file.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$service | string | ||
$connection_settings | array |
Returns
void