Move OptionManager from Common/Manager to Manager (#428)
This commit is contained in:
parent
bc17311f5f
commit
69b091b37c
@ -3,6 +3,7 @@
|
|||||||
namespace Box\Spout\Writer\CSV\Manager;
|
namespace Box\Spout\Writer\CSV\Manager;
|
||||||
|
|
||||||
use Box\Spout\Writer\Common\Options;
|
use Box\Spout\Writer\Common\Options;
|
||||||
|
use Box\Spout\Writer\Manager\OptionsManagerAbstract;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class OptionsManager
|
* Class OptionsManager
|
||||||
@ -10,7 +11,7 @@ use Box\Spout\Writer\Common\Options;
|
|||||||
*
|
*
|
||||||
* @package Box\Spout\Writer\CSV\Manager
|
* @package Box\Spout\Writer\CSV\Manager
|
||||||
*/
|
*/
|
||||||
class OptionsManager extends \Box\Spout\Writer\Common\Manager\OptionsManager
|
class OptionsManager extends OptionsManagerAbstract
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Box\Spout\Writer\Factory;
|
namespace Box\Spout\Writer\Factory;
|
||||||
|
|
||||||
use Box\Spout\Writer\Common\Manager\OptionsManagerInterface;
|
use Box\Spout\Writer\Manager\OptionsManagerInterface;
|
||||||
use Box\Spout\Writer\Manager\WorkbookManagerInterface;
|
use Box\Spout\Writer\Manager\WorkbookManagerInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Box\Spout\Writer\Common\Manager;
|
namespace Box\Spout\Writer\Manager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class OptionsManager
|
* Class OptionsManager
|
||||||
* Writer' options manager
|
* Writer' options manager
|
||||||
*
|
*
|
||||||
* @package Box\Spout\Writer\Common\Manager
|
* @package Box\Spout\Writer\Manager
|
||||||
*/
|
*/
|
||||||
abstract class OptionsManager implements OptionsManagerInterface
|
abstract class OptionsManagerAbstract implements OptionsManagerInterface
|
||||||
{
|
{
|
||||||
const PREFIX_OPTION = 'OPTION_';
|
const PREFIX_OPTION = 'OPTION_';
|
||||||
|
|
@ -1,12 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Box\Spout\Writer\Common\Manager;
|
namespace Box\Spout\Writer\Manager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface OptionsManagerInterface
|
* Interface OptionsManagerInterface
|
||||||
* Writer' options interface
|
* Writer' options interface
|
||||||
*
|
*
|
||||||
* @package Box\Spout\Writer\Common\Manager
|
* @package Box\Spout\Writer\Manager
|
||||||
*/
|
*/
|
||||||
interface OptionsManagerInterface
|
interface OptionsManagerInterface
|
||||||
{
|
{
|
@ -5,7 +5,7 @@ namespace Box\Spout\Writer\Manager;
|
|||||||
use Box\Spout\Common\Exception\IOException;
|
use Box\Spout\Common\Exception\IOException;
|
||||||
use Box\Spout\Writer\Common\Helper\FileSystemWithRootFolderHelperInterface;
|
use Box\Spout\Writer\Common\Helper\FileSystemWithRootFolderHelperInterface;
|
||||||
use Box\Spout\Writer\Common\Helper\StyleHelperInterface;
|
use Box\Spout\Writer\Common\Helper\StyleHelperInterface;
|
||||||
use Box\Spout\Writer\Common\Manager\OptionsManagerInterface;
|
use Box\Spout\Writer\Manager\OptionsManagerInterface;
|
||||||
use Box\Spout\Writer\Common\Options;
|
use Box\Spout\Writer\Common\Options;
|
||||||
use Box\Spout\Writer\Common\Sheet;
|
use Box\Spout\Writer\Common\Sheet;
|
||||||
use Box\Spout\Writer\Entity\Workbook;
|
use Box\Spout\Writer\Entity\Workbook;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
namespace Box\Spout\Writer\ODS\Factory;
|
namespace Box\Spout\Writer\ODS\Factory;
|
||||||
|
|
||||||
use Box\Spout\Common\Helper\StringHelper;
|
use Box\Spout\Common\Helper\StringHelper;
|
||||||
use Box\Spout\Writer\Common\Manager\OptionsManagerInterface;
|
use Box\Spout\Writer\Manager\OptionsManagerInterface;
|
||||||
use Box\Spout\Writer\Common\Options;
|
use Box\Spout\Writer\Common\Options;
|
||||||
use Box\Spout\Writer\Factory\EntityFactory;
|
use Box\Spout\Writer\Factory\EntityFactory;
|
||||||
use Box\Spout\Writer\Factory\InternalFactoryInterface;
|
use Box\Spout\Writer\Factory\InternalFactoryInterface;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
namespace Box\Spout\Writer\ODS\Manager;
|
namespace Box\Spout\Writer\ODS\Manager;
|
||||||
|
|
||||||
use Box\Spout\Writer\Common\Options;
|
use Box\Spout\Writer\Common\Options;
|
||||||
|
use Box\Spout\Writer\Manager\OptionsManagerAbstract;
|
||||||
use Box\Spout\Writer\Style\StyleBuilder;
|
use Box\Spout\Writer\Style\StyleBuilder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -11,7 +12,7 @@ use Box\Spout\Writer\Style\StyleBuilder;
|
|||||||
*
|
*
|
||||||
* @package Box\Spout\Writer\ODS\Manager
|
* @package Box\Spout\Writer\ODS\Manager
|
||||||
*/
|
*/
|
||||||
class OptionsManager extends \Box\Spout\Writer\Common\Manager\OptionsManager
|
class OptionsManager extends OptionsManagerAbstract
|
||||||
{
|
{
|
||||||
/** @var StyleBuilder Style builder */
|
/** @var StyleBuilder Style builder */
|
||||||
protected $styleBuilder;
|
protected $styleBuilder;
|
||||||
|
@ -6,7 +6,7 @@ use Box\Spout\Common\Exception\InvalidArgumentException;
|
|||||||
use Box\Spout\Common\Exception\IOException;
|
use Box\Spout\Common\Exception\IOException;
|
||||||
use Box\Spout\Common\Exception\SpoutException;
|
use Box\Spout\Common\Exception\SpoutException;
|
||||||
use Box\Spout\Common\Helper\FileSystemHelper;
|
use Box\Spout\Common\Helper\FileSystemHelper;
|
||||||
use Box\Spout\Writer\Common\Manager\OptionsManagerInterface;
|
use Box\Spout\Writer\Manager\OptionsManagerInterface;
|
||||||
use Box\Spout\Writer\Common\Options;
|
use Box\Spout\Writer\Common\Options;
|
||||||
use Box\Spout\Writer\Exception\WriterAlreadyOpenedException;
|
use Box\Spout\Writer\Exception\WriterAlreadyOpenedException;
|
||||||
use Box\Spout\Writer\Exception\WriterNotOpenedException;
|
use Box\Spout\Writer\Exception\WriterNotOpenedException;
|
||||||
@ -31,7 +31,7 @@ abstract class WriterAbstract implements WriterInterface
|
|||||||
/** @var \Box\Spout\Common\Helper\GlobalFunctionsHelper Helper to work with global functions */
|
/** @var \Box\Spout\Common\Helper\GlobalFunctionsHelper Helper to work with global functions */
|
||||||
protected $globalFunctionsHelper;
|
protected $globalFunctionsHelper;
|
||||||
|
|
||||||
/** @var \Box\Spout\Writer\Common\Manager\OptionsManagerInterface Writer options manager */
|
/** @var \Box\Spout\Writer\Manager\OptionsManagerInterface Writer options manager */
|
||||||
protected $optionsManager;
|
protected $optionsManager;
|
||||||
|
|
||||||
/** @var Style\Style Style to be applied to the next written row(s) */
|
/** @var Style\Style Style to be applied to the next written row(s) */
|
||||||
@ -66,7 +66,7 @@ abstract class WriterAbstract implements WriterInterface
|
|||||||
abstract protected function closeWriter();
|
abstract protected function closeWriter();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \Box\Spout\Writer\Common\Manager\OptionsManagerInterface $optionsManager
|
* @param \Box\Spout\Writer\Manager\OptionsManagerInterface $optionsManager
|
||||||
*/
|
*/
|
||||||
public function __construct(OptionsManagerInterface $optionsManager)
|
public function __construct(OptionsManagerInterface $optionsManager)
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Box\Spout\Writer;
|
namespace Box\Spout\Writer;
|
||||||
|
|
||||||
use Box\Spout\Writer\Common\Manager\OptionsManagerInterface;
|
use Box\Spout\Writer\Manager\OptionsManagerInterface;
|
||||||
use Box\Spout\Writer\Common\Options;
|
use Box\Spout\Writer\Common\Options;
|
||||||
use Box\Spout\Writer\Entity\Worksheet;
|
use Box\Spout\Writer\Entity\Worksheet;
|
||||||
use Box\Spout\Writer\Exception\WriterNotOpenedException;
|
use Box\Spout\Writer\Exception\WriterNotOpenedException;
|
||||||
|
@ -4,7 +4,7 @@ namespace Box\Spout\Writer\XLSX\Factory;
|
|||||||
|
|
||||||
use Box\Spout\Common\Escaper;
|
use Box\Spout\Common\Escaper;
|
||||||
use Box\Spout\Common\Helper\StringHelper;
|
use Box\Spout\Common\Helper\StringHelper;
|
||||||
use Box\Spout\Writer\Common\Manager\OptionsManagerInterface;
|
use Box\Spout\Writer\Manager\OptionsManagerInterface;
|
||||||
use Box\Spout\Writer\Common\Options;
|
use Box\Spout\Writer\Common\Options;
|
||||||
use Box\Spout\Writer\Factory\EntityFactory;
|
use Box\Spout\Writer\Factory\EntityFactory;
|
||||||
use Box\Spout\Writer\Factory\InternalFactoryInterface;
|
use Box\Spout\Writer\Factory\InternalFactoryInterface;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
namespace Box\Spout\Writer\XLSX\Manager;
|
namespace Box\Spout\Writer\XLSX\Manager;
|
||||||
|
|
||||||
use Box\Spout\Writer\Common\Options;
|
use Box\Spout\Writer\Common\Options;
|
||||||
|
use Box\Spout\Writer\Manager\OptionsManagerAbstract;
|
||||||
use Box\Spout\Writer\Style\StyleBuilder;
|
use Box\Spout\Writer\Style\StyleBuilder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -11,7 +12,7 @@ use Box\Spout\Writer\Style\StyleBuilder;
|
|||||||
*
|
*
|
||||||
* @package Box\Spout\Writer\XLSX\Manager
|
* @package Box\Spout\Writer\XLSX\Manager
|
||||||
*/
|
*/
|
||||||
class OptionsManager extends \Box\Spout\Writer\Common\Manager\OptionsManager
|
class OptionsManager extends OptionsManagerAbstract
|
||||||
{
|
{
|
||||||
/** Default style font values */
|
/** Default style font values */
|
||||||
const DEFAULT_FONT_SIZE = 12;
|
const DEFAULT_FONT_SIZE = 12;
|
||||||
|
@ -7,7 +7,7 @@ use Box\Spout\Common\Exception\IOException;
|
|||||||
use Box\Spout\Common\Helper\StringHelper;
|
use Box\Spout\Common\Helper\StringHelper;
|
||||||
use Box\Spout\Writer\Common\Cell;
|
use Box\Spout\Writer\Common\Cell;
|
||||||
use Box\Spout\Writer\Common\Helper\CellHelper;
|
use Box\Spout\Writer\Common\Helper\CellHelper;
|
||||||
use Box\Spout\Writer\Common\Manager\OptionsManagerInterface;
|
use Box\Spout\Writer\Manager\OptionsManagerInterface;
|
||||||
use Box\Spout\Writer\Common\Options;
|
use Box\Spout\Writer\Common\Options;
|
||||||
use Box\Spout\Writer\Entity\Worksheet;
|
use Box\Spout\Writer\Entity\Worksheet;
|
||||||
use Box\Spout\Writer\Manager\WorksheetManagerInterface;
|
use Box\Spout\Writer\Manager\WorksheetManagerInterface;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Box\Spout\Writer\Common\Manager;
|
namespace Box\Spout\Writer\Manager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class OptionsManagerTest
|
* Class OptionsManagerTest
|
||||||
*
|
*
|
||||||
* @package Box\Spout\Writer\Common\Manager
|
* @package Box\Spout\Writer\Manager
|
||||||
*/
|
*/
|
||||||
class OptionsManagerTest extends \PHPUnit_Framework_TestCase
|
class OptionsManagerTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
@ -51,7 +51,7 @@ class OptionsManagerTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
|
|
||||||
// TODO: Convert this to anonymous class when PHP < 7 support is dropped
|
// TODO: Convert this to anonymous class when PHP < 7 support is dropped
|
||||||
class FakeOptionsManager extends OptionsManager
|
class FakeOptionsManager extends OptionsManagerAbstract
|
||||||
{
|
{
|
||||||
protected function getSupportedOptions()
|
protected function getSupportedOptions()
|
||||||
{
|
{
|
Loading…
x
Reference in New Issue
Block a user