Inject GlobalFunctionsHelper through constructor for Writers (#436)

This commit is contained in:
Adrien Loison authored and GitHub committed 2017-05-30 14:37:38 +02:00
1 parent 7ec0f565fd
commit 762dd1573a
4 files changed
+27 -34

No files matched your search

+7 -11
View File
@@ -49,11 +49,17 @@ abstract class WriterAbstract implements WriterInterface
/**
* @param OptionsManagerInterface $optionsManager
* @param StyleMerger $styleMerger
* @param GlobalFunctionsHelper $globalFunctionsHelper
*/
public function __construct(OptionsManagerInterface $optionsManager, StyleMerger $styleMerger)
public function __construct(
OptionsManagerInterface $optionsManager,
StyleMerger $styleMerger,
GlobalFunctionsHelper $globalFunctionsHelper)
{
$this->optionsManager = $optionsManager;
$this->styleMerger = $styleMerger;
$this->globalFunctionsHelper = $globalFunctionsHelper;
$this->resetRowStyleToDefault();
}
@@ -97,16 +103,6 @@ abstract class WriterAbstract implements WriterInterface
return $this;
}
/**
* @param \Box\Spout\Common\Helper\GlobalFunctionsHelper $globalFunctionsHelper
* @return WriterAbstract
*/
public function setGlobalFunctionsHelper($globalFunctionsHelper)
{
$this->globalFunctionsHelper = $globalFunctionsHelper;
return $this;
}
/**
* Inits the writer and opens it to accept data.
* By using this method, the data will be written to a file.