public function phpImportDatabase($opts = [
        'service' => null,
        'import_path' => null,
        'localhost' => false,
    ])
    {
        $this->executeCommandHook(__FUNCTION__, 'before');
        /** @var PhpProjectType $instance */
        $instance = $this->getProjectInstance();

        $service = isset($opts['service'])
            ? $opts['service']
            : $instance->getPhpServiceName();

        $instance->importDatabaseToService(
            $service,
            $opts['import_path'],
            true,
            $opts['localhost']
        );
        $this->executeCommandHook(__FUNCTION__, 'after');
    }
public function phpImportDatabase($opts = [
        'service' => null,
        'import_path' => null,
        'localhost' => false,
    ])
    {
        $this->executeCommandHook(__FUNCTION__, 'before');
        /** @var PhpProjectType $instance */
        $instance = $this->getProjectInstance();

        $service = isset($opts['service'])
            ? $opts['service']
            : $instance->getPhpServiceName();

        $instance->importDatabaseToService(
            $service,
            $opts['import_path'],
            true,
            $opts['localhost']
        );
        $this->executeCommandHook(__FUNCTION__, 'after');
    }
public function phpImportDatabase ( $ opts = [ 'service' => null , 'import_path' => null , 'localhost' => false , ] ) { $ this -> executeCommandHook ( __FUNCTION__ , 'before' ) ; /** @var PhpProjectType $instance */ $ instance = $ this -> getProjectInstance ( ) ; $ service = isset ( $ opts [ 'service' ] ) ? $ opts [ 'service' ] : $ instance -> getPhpServiceName ( ) ; $ instance -> importDatabaseToService ( $ service , $ opts [ 'import_path' ] , true , $ opts [ 'localhost' ] ) ; $ this -> executeCommandHook ( __FUNCTION__ , 'after' ) ; }
Import PHP project database.

@param array $opts
@option string $service The database service name.
@option string $import_path The path to the database exported file.
@option bool $localhost Run the database import command from localhost.

@throws \Exception
Import PHP project database .