| @@ 18-44 (lines=27) @@ | ||
| 15 | * FTP Configuration implementation |
|
| 16 | * @package Bee4\Transport\Configuration |
|
| 17 | */ |
|
| 18 | class FtpConfiguration extends Configuration |
|
| 19 | { |
|
| 20 | use HasCommand; |
|
| 21 | ||
| 22 | /** |
|
| 23 | * Default configuration values |
|
| 24 | */ |
|
| 25 | const DEFAULTS = [ |
|
| 26 | 'commands' => [ |
|
| 27 | 'request' => null, |
|
| 28 | 'post' => null |
|
| 29 | ], |
|
| 30 | 'passive' => true |
|
| 31 | ]; |
|
| 32 | ||
| 33 | /** |
|
| 34 | * Build a configuration instance |
|
| 35 | * @param array $data |
|
| 36 | */ |
|
| 37 | public function __construct(array $data = []) |
|
| 38 | { |
|
| 39 | parent::__construct(array_merge( |
|
| 40 | self::DEFAULTS, |
|
| 41 | $data |
|
| 42 | )); |
|
| 43 | } |
|
| 44 | } |
|
| 45 | ||
| @@ 18-43 (lines=26) @@ | ||
| 15 | * SSH Configuration implementation |
|
| 16 | * @package Bee4\Transport\Configuration |
|
| 17 | */ |
|
| 18 | class SshConfiguration extends Configuration |
|
| 19 | { |
|
| 20 | use HasCommand; |
|
| 21 | ||
| 22 | /** |
|
| 23 | * Default configuration values |
|
| 24 | */ |
|
| 25 | const DEFAULTS = [ |
|
| 26 | 'commands' => [ |
|
| 27 | 'request' => null, |
|
| 28 | 'post' => null |
|
| 29 | ] |
|
| 30 | ]; |
|
| 31 | ||
| 32 | /** |
|
| 33 | * Build a configuration instance |
|
| 34 | * @param array $data |
|
| 35 | */ |
|
| 36 | public function __construct(array $data = []) |
|
| 37 | { |
|
| 38 | parent::__construct(array_merge( |
|
| 39 | self::DEFAULTS, |
|
| 40 | $data |
|
| 41 | )); |
|
| 42 | } |
|
| 43 | } |
|
| 44 | ||