@@ 394-405 (lines=12) @@ | ||
391 | * |
|
392 | * @return \phpbu\App\Cli\Executable\Mysql |
|
393 | */ |
|
394 | private function createMysqlExecutable(): Executable\Mysql |
|
395 | { |
|
396 | $executable = new Executable\Mysql($this->pathToMysql); |
|
397 | $executable->credentials($this->user, $this->password) |
|
398 | ->useHost($this->host) |
|
399 | ->usePort($this->port) |
|
400 | ->useProtocol($this->protocol) |
|
401 | ->useQuickMode($this->quick) |
|
402 | ->useCompression($this->compress); |
|
403 | ||
404 | return $executable; |
|
405 | } |
|
406 | ||
407 | /** |
|
408 | * Create the Executable to run the mysqlimport command. |
|
@@ 415-426 (lines=12) @@ | ||
412 | * |
|
413 | * @return \phpbu\App\Cli\Executable\Mysqlimport |
|
414 | */ |
|
415 | private function createMysqlimportExecutable(string $sourceFilename, string $targetDatabase): Executable\Mysqlimport |
|
416 | { |
|
417 | $executable = new Executable\Mysqlimport($this->pathToMysqlimport); |
|
418 | $executable->setSourceAndTarget($sourceFilename, $targetDatabase) |
|
419 | ->credentials($this->user, $this->password) |
|
420 | ->useHost($this->host) |
|
421 | ->usePort($this->port) |
|
422 | ->useProtocol($this->protocol) |
|
423 | ->useCompression($this->compress); |
|
424 | ||
425 | return $executable; |
|
426 | } |
|
427 | } |
|
428 |