Update export routine.

This commit is contained in:
James Cole
2017-02-05 16:14:23 +01:00
parent 704c0922e8
commit 77e52f42a6
2 changed files with 24 additions and 17 deletions

View File

@@ -53,18 +53,9 @@ class Processor implements ProcessorInterface
/**
* Processor constructor.
*
* @param array $settings
*/
public function __construct(array $settings)
public function __construct()
{
// save settings
$this->settings = $settings;
$this->accounts = $settings['accounts'];
$this->exportFormat = $settings['exportFormat'];
$this->includeAttachments = $settings['includeAttachments'];
$this->includeOldUploads = $settings['includeOldUploads'];
$this->job = $settings['job'];
$this->journals = new Collection;
$this->exportEntries = new Collection;
$this->files = new Collection;
@@ -185,6 +176,20 @@ class Processor implements ProcessorInterface
return $this->files;
}
/**
* @param array $settings
*/
public function setSettings(array $settings)
{
// save settings
$this->settings = $settings;
$this->accounts = $settings['accounts'];
$this->exportFormat = $settings['exportFormat'];
$this->includeAttachments = $settings['includeAttachments'];
$this->includeOldUploads = $settings['includeOldUploads'];
$this->job = $settings['job'];
}
/**
*
*/

View File

@@ -25,11 +25,8 @@ interface ProcessorInterface
/**
* Processor constructor.
*
* @param array $settings
*
*/
public function __construct(array $settings);
public function __construct();
/**
* @return bool
@@ -65,4 +62,9 @@ interface ProcessorInterface
* @return Collection
*/
public function getFiles(): Collection;
/**
* @param array $settings
*/
public function setSettings(array $settings);
}