mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-30 20:18:00 +00:00
Merge pull request #4551 from oleibman/base2html
Minor Breaking Change - Move Some BaseWriter Properties
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
|
||||
namespace PhpOffice\PhpSpreadsheet\Writer;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException;
|
||||
|
||||
abstract class BaseWriter implements IWriter
|
||||
{
|
||||
/**
|
||||
@@ -19,18 +17,6 @@ abstract class BaseWriter implements IWriter
|
||||
*/
|
||||
protected bool $preCalculateFormulas = true;
|
||||
|
||||
/**
|
||||
* Table formats
|
||||
* Enables table formats in writer, disabled here, must be enabled in writer via a setter.
|
||||
*/
|
||||
protected bool $tableFormats = false;
|
||||
|
||||
/**
|
||||
* Conditional Formatting
|
||||
* Enables conditional formatting in writer, disabled here, must be enabled in writer via a setter.
|
||||
*/
|
||||
protected bool $conditionalFormatting = false;
|
||||
|
||||
/**
|
||||
* Use disk caching where possible?
|
||||
*/
|
||||
@@ -72,34 +58,6 @@ abstract class BaseWriter implements IWriter
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getTableFormats(): bool
|
||||
{
|
||||
return $this->tableFormats;
|
||||
}
|
||||
|
||||
public function setTableFormats(bool $tableFormats): self
|
||||
{
|
||||
if ($tableFormats) {
|
||||
throw new PhpSpreadsheetException('Table formatting not implemented for this writer');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getConditionalFormatting(): bool
|
||||
{
|
||||
return $this->conditionalFormatting;
|
||||
}
|
||||
|
||||
public function setConditionalFormatting(bool $conditionalFormatting): self
|
||||
{
|
||||
if ($conditionalFormatting) {
|
||||
throw new PhpSpreadsheetException('Conditional Formatting not implemented for this writer');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getUseDiskCaching(): bool
|
||||
{
|
||||
return $this->useDiskCaching;
|
||||
|
||||
@@ -162,6 +162,18 @@ class Html extends BaseWriter
|
||||
|
||||
protected bool $ltrSheets = false;
|
||||
|
||||
/**
|
||||
* Table formats
|
||||
* Enables table formats in writer, disabled here, must be enabled in writer via a setter.
|
||||
*/
|
||||
protected bool $tableFormats = false;
|
||||
|
||||
/**
|
||||
* Conditional Formatting
|
||||
* Enables conditional formatting in writer, disabled here, must be enabled in writer via a setter.
|
||||
*/
|
||||
protected bool $conditionalFormatting = false;
|
||||
|
||||
/**
|
||||
* Create a new HTML.
|
||||
*/
|
||||
@@ -1935,6 +1947,11 @@ class Html extends BaseWriter
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getTableFormats(): bool
|
||||
{
|
||||
return $this->tableFormats;
|
||||
}
|
||||
|
||||
public function setTableFormats(bool $tableFormats): self
|
||||
{
|
||||
$this->tableFormats = $tableFormats;
|
||||
@@ -1942,6 +1959,11 @@ class Html extends BaseWriter
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getConditionalFormatting(): bool
|
||||
{
|
||||
return $this->conditionalFormatting;
|
||||
}
|
||||
|
||||
public function setConditionalFormatting(bool $conditionalFormatting): self
|
||||
{
|
||||
$this->conditionalFormatting = $conditionalFormatting;
|
||||
|
||||
Reference in New Issue
Block a user