Split Writer EntityFactory into interal and external ones
This commit is contained in:
1 parent
ca5962271e
commit
2d2151ac8d
10 files changed
+83
-72
No files matched your search
@@ -5,7 +5,7 @@ namespace Box\Spout\Writer\XLSX\Creator;
|
||||
use Box\Spout\Common\Helper\Escaper;
|
||||
use Box\Spout\Common\Helper\StringHelper;
|
||||
use Box\Spout\Common\Manager\OptionsManagerInterface;
|
||||
use Box\Spout\Writer\Common\Creator\EntityFactory;
|
||||
use Box\Spout\Writer\Common\Creator\InternalEntityFactory;
|
||||
use Box\Spout\Writer\Common\Entity\Options;
|
||||
use Box\Spout\Writer\Common\Helper\ZipHelper;
|
||||
use Box\Spout\Writer\XLSX\Helper\FileSystemHelper;
|
||||
@@ -18,10 +18,10 @@ class HelperFactory extends \Box\Spout\Common\Creator\HelperFactory
|
||||
{
|
||||
/**
|
||||
* @param OptionsManagerInterface $optionsManager
|
||||
* @param EntityFactory $entityFactory
|
||||
* @param InternalEntityFactory $entityFactory
|
||||
* @return FileSystemHelper
|
||||
*/
|
||||
public function createSpecificFileSystemHelper(OptionsManagerInterface $optionsManager, EntityFactory $entityFactory)
|
||||
public function createSpecificFileSystemHelper(OptionsManagerInterface $optionsManager, InternalEntityFactory $entityFactory)
|
||||
{
|
||||
$tempFolder = $optionsManager->getOption(Options::TEMP_FOLDER);
|
||||
$zipHelper = $this->createZipHelper($entityFactory);
|
||||
@@ -31,10 +31,10 @@ class HelperFactory extends \Box\Spout\Common\Creator\HelperFactory
|
||||
}
|
||||
|
||||
/**
|
||||
* @param EntityFactory $entityFactory
|
||||
* @param InternalEntityFactory $entityFactory
|
||||
* @return ZipHelper
|
||||
*/
|
||||
private function createZipHelper(EntityFactory $entityFactory)
|
||||
private function createZipHelper(InternalEntityFactory $entityFactory)
|
||||
{
|
||||
return new ZipHelper($entityFactory);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace Box\Spout\Writer\XLSX\Creator;
|
||||
|
||||
use Box\Spout\Common\Manager\OptionsManagerInterface;
|
||||
use Box\Spout\Writer\Common\Creator\EntityFactory;
|
||||
use Box\Spout\Writer\Common\Creator\InternalEntityFactory;
|
||||
use Box\Spout\Writer\Common\Creator\ManagerFactoryInterface;
|
||||
use Box\Spout\Writer\Common\Entity\Options;
|
||||
use Box\Spout\Writer\Common\Manager\SheetManager;
|
||||
@@ -19,17 +19,17 @@ use Box\Spout\Writer\XLSX\Manager\WorksheetManager;
|
||||
*/
|
||||
class ManagerFactory implements ManagerFactoryInterface
|
||||
{
|
||||
/** @var EntityFactory */
|
||||
/** @var InternalEntityFactory */
|
||||
protected $entityFactory;
|
||||
|
||||
/** @var HelperFactory $helperFactory */
|
||||
protected $helperFactory;
|
||||
|
||||
/**
|
||||
* @param EntityFactory $entityFactory
|
||||
* @param InternalEntityFactory $entityFactory
|
||||
* @param HelperFactory $helperFactory
|
||||
*/
|
||||
public function __construct(EntityFactory $entityFactory, HelperFactory $helperFactory)
|
||||
public function __construct(InternalEntityFactory $entityFactory, HelperFactory $helperFactory)
|
||||
{
|
||||
$this->entityFactory = $entityFactory;
|
||||
$this->helperFactory = $helperFactory;
|
||||
|
||||
Reference in new issue
Block a user