Move ReaderCommonOptions class to Common folder (#343)

This commit is contained in:
Adrien Loison 2016-10-18 16:55:05 -07:00 committed by GitHub
parent a19231fb68
commit 3a330debb3
5 changed files with 11 additions and 16 deletions

View File

@ -19,13 +19,13 @@ abstract class AbstractReader implements ReaderInterface
/** @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\Reader\ReaderOptionsCommon Reader's customized options */ /** @var \Box\Spout\Reader\Common\ReaderOptions Reader's customized options */
protected $options; protected $options;
/** /**
* Returns the reader's current options * Returns the reader's current options
* *
* @return \Box\Spout\Reader\ReaderOptionsCommon * @return \Box\Spout\Reader\Common\ReaderOptions
*/ */
abstract protected function getOptions(); abstract protected function getOptions();

View File

@ -3,7 +3,6 @@
namespace Box\Spout\Reader\CSV; namespace Box\Spout\Reader\CSV;
use Box\Spout\Common\Helper\EncodingHelper; use Box\Spout\Common\Helper\EncodingHelper;
use Box\Spout\Reader\ReaderOptionsCommon;
/** /**
* Class ReaderOptions * Class ReaderOptions
@ -11,7 +10,7 @@ use Box\Spout\Reader\ReaderOptionsCommon;
* *
* @package Box\Spout\Reader\CSV * @package Box\Spout\Reader\CSV
*/ */
class ReaderOptions extends ReaderOptionsCommon class ReaderOptions extends \Box\Spout\Reader\Common\ReaderOptions
{ {
/** @var string Defines the character used to delimit fields (one character only) */ /** @var string Defines the character used to delimit fields (one character only) */
protected $fieldDelimiter = ','; protected $fieldDelimiter = ',';

View File

@ -1,14 +1,14 @@
<?php <?php
namespace Box\Spout\Reader; namespace Box\Spout\Reader\Common;
/** /**
* Class ReaderOptionsCommon * Class ReaderOptions
* Readers' common options * Readers' common options
* *
* @package Box\Spout\Reader * @package Box\Spout\Reader\Common
*/ */
class ReaderOptionsCommon class ReaderOptions
{ {
/** @var bool Whether date/time values should be returned as PHP objects or be formatted as strings */ /** @var bool Whether date/time values should be returned as PHP objects or be formatted as strings */
protected $shouldFormatDates = false; protected $shouldFormatDates = false;
@ -28,7 +28,7 @@ class ReaderOptionsCommon
* Sets whether date/time values should be returned as PHP objects or be formatted as strings. * Sets whether date/time values should be returned as PHP objects or be formatted as strings.
* *
* @param bool $shouldFormatDates * @param bool $shouldFormatDates
* @return ReaderOptionsCommon * @return ReaderOptions
*/ */
public function setShouldFormatDates($shouldFormatDates) public function setShouldFormatDates($shouldFormatDates)
{ {
@ -48,7 +48,7 @@ class ReaderOptionsCommon
* Sets whether empty rows should be returned or skipped. * Sets whether empty rows should be returned or skipped.
* *
* @param bool $shouldPreserveEmptyRows * @param bool $shouldPreserveEmptyRows
* @return ReaderOptionsCommon * @return ReaderOptions
*/ */
public function setShouldPreserveEmptyRows($shouldPreserveEmptyRows) public function setShouldPreserveEmptyRows($shouldPreserveEmptyRows)
{ {

View File

@ -2,15 +2,13 @@
namespace Box\Spout\Reader\ODS; namespace Box\Spout\Reader\ODS;
use Box\Spout\Reader\ReaderOptionsCommon;
/** /**
* Class ReaderOptions * Class ReaderOptions
* This class is used to customize the reader's behavior * This class is used to customize the reader's behavior
* *
* @package Box\Spout\Reader\ODS * @package Box\Spout\Reader\ODS
*/ */
class ReaderOptions extends ReaderOptionsCommon class ReaderOptions extends \Box\Spout\Reader\Common\ReaderOptions
{ {
// No extra options // No extra options
} }

View File

@ -2,15 +2,13 @@
namespace Box\Spout\Reader\XLSX; namespace Box\Spout\Reader\XLSX;
use Box\Spout\Reader\ReaderOptionsCommon;
/** /**
* Class ReaderOptions * Class ReaderOptions
* This class is used to customize the reader's behavior * This class is used to customize the reader's behavior
* *
* @package Box\Spout\Reader\XLSX * @package Box\Spout\Reader\XLSX
*/ */
class ReaderOptions extends ReaderOptionsCommon class ReaderOptions extends \Box\Spout\Reader\Common\ReaderOptions
{ {
/** @var string|null Temporary folder where the temporary files will be created */ /** @var string|null Temporary folder where the temporary files will be created */
protected $tempFolder = null; protected $tempFolder = null;