CopySurveyResources

This class is responsible for copying a survey's resources.

Class CopySurveyResources

package

LimeSurvey\Models\Services

Methods

Adds the file to the failed files array

addError(string $filename,string $status)

Arguments

$filename

string

$status

string

Adds the file to the copied files array

addSuccess(string $filename,string $status)

Arguments

$filename

string

$status

string

Creates the target directory if it doesn't exists

checkTargetDir( $targetDir): boolean

Arguments

$targetDir

Response

boolean

Returns true if the directory exists or was created.

Copy $sourceDir to $targetDir.

copyDirectory(string $sourceDir,string $targetDir)

Arguments

$sourceDir

string

$targetDir

string

Copy resources from the source survey ($sourceSurveyId) to the target survey ($targetSurveyId)

copyResources(integer $sourceSurveyId,integer $targetSurveyId): array

Arguments

$sourceSurveyId

integer

$targetSurveyId

integer

Response

array

An array of failed and copied files/directories

Returns the array of failed and copied files/directories

getResult(): \LimeSurvey\Models\Services\array<array<array<string,string>>>

Response

\LimeSurvey\Models\Services\array>>

Properties

array of successfully copied files/dirs in the form ['filename' => ..., 'status' => ...]

copiedFilesInfo :\LimeSurvey\Models\Services\array<array<string,string>>
var

array of successfully copied files/dirs in the form ['filename' => ..., 'status' => ...]

Type(s)

\LimeSurvey\Models\Services\array>

array of failed files/dirs in the form ['filename' => ..., 'status' => ...]

errorFilesInfo :\LimeSurvey\Models\Services\array<array<string,string>>
var

array of failed files/dirs in the form ['filename' => ..., 'status' => ...]

Type(s)

\LimeSurvey\Models\Services\array>