Rename and move some files.

This commit is contained in:
James Cole
2018-01-04 18:34:51 +01:00
parent bc879a3872
commit 5866300ac1
10 changed files with 451 additions and 400 deletions

View File

@@ -86,6 +86,7 @@ class ImportJobRepository implements ImportJobRepositoryInterface
*/
public function findByKey(string $key): ImportJob
{
/** @var ImportJob $result */
$result = $this->user->importJobs()->where('key', $key)->first(['import_jobs.*']);
if (null === $result) {
return new ImportJob;
@@ -94,6 +95,23 @@ class ImportJobRepository implements ImportJobRepositoryInterface
return $result;
}
/**
* Return configuration of job.
*
* @param ImportJob $job
*
* @return array
*/
public function getConfiguration(ImportJob $job): array
{
$config = $job->configuration;
if (is_array($config)) {
return $config;
}
return [];
}
/**
* @param ImportJob $job
* @param UploadedFile $file

View File

@@ -45,6 +45,15 @@ interface ImportJobRepositoryInterface
*/
public function findByKey(string $key): ImportJob;
/**
* Return configuration of job.
*
* @param ImportJob $job
*
* @return array
*/
public function getConfiguration(ImportJob $job): array;
/**
* @param ImportJob $job
* @param UploadedFile $file