/** * Fetch databases and collections to backup. * * @param array $conf */ protected function setupSourceData(array $conf) { $this->databases = Util\Str::toList(Util\Arr::getValue($conf, 'databases')); $this->collections = Util\Str::toList(Util\Arr::getValue($conf, 'collections')); $this->excludeCollections = Util\Str::toList(Util\Arr::getValue($conf, 'excludeCollections')); $this->excludeCollectionsWithPrefix = Util\Str::toList(Util\Arr::getValue($conf, 'excludeCollectionsWithPrefix')); }
/** * Get tables and databases to backup. * * @param array $conf */ protected function setupSourceData(array $conf) { $this->include = Util\Arr::getValue($conf, 'include'); $this->databases = Util\Str::toList(Util\Arr::getValue($conf, 'databases')); }
/** * (non-PHPDoc) * * @see \phpbu\App\Backup\Sync::setup() * @param array $options * @throws \phpbu\App\Backup\Sync\Exception */ public function setup(array $options) { $this->pathToRsync = Util\Arr::getValue($options, 'pathToRsync'); if (Util\Arr::isSetAndNotEmptyString($options, 'args')) { $this->args = $options['args']; } else { if (!Util\Arr::isSetAndNotEmptyString($options, 'path')) { throw new Exception('option \'path\' is missing'); } $this->path = Util\Str::replaceDatePlaceholders($options['path']); if (Util\Arr::isSetAndNotEmptyString($options, 'user')) { $this->user = $options['user']; } if (Util\Arr::isSetAndNotEmptyString($options, 'host')) { $this->host = $options['host']; } $this->excludes = Util\Str::toList(Util\Arr::getValue($options, 'exclude', ''), ':'); $this->delete = Util\Str::toBoolean(Util\Arr::getValue($options, 'delete', ''), false); $this->isDirSync = Util\Str::toBoolean(Util\Arr::getValue($options, 'dirsync', ''), false); } }
/** * Get tables and databases to backup. * * @param array $conf */ protected function setupSourceData(array $conf) { $this->tables = Util\Str::toList(Util\Arr::getValue($conf, 'tables')); $this->databases = Util\Str::toList(Util\Arr::getValue($conf, 'databases')); $this->ignoreTables = Util\Str::toList(Util\Arr::getValue($conf, 'ignoreTables')); $this->structureOnly = Util\Str::toList(Util\Arr::getValue($conf, 'structureOnly')); }
/** * Get collections and data to backup. * * @param array $conf */ protected function setupSourceData(array $conf) { $this->dumpData = Util\Str::toBoolean(Util\Arr::getValue($conf, 'dumpData'), false); $this->includeSystemCollections = Util\Str::toBoolean(Util\Arr::getValue($conf, 'includeSystemCollections'), false); $this->collections = Util\Str::toList(Util\Arr::getValue($conf, 'collections')); }