PhpSpreadsheet/docs/topics
oleibman ae0cd46423
Add exportArray Method for Styles (#1580)
Issue #580 has gone stale since I started work on this.
Nevertheless, this implements an exportArray function as an
exact counterpart of applyFromArry.
I chose the name exportArray to avoid confusion with the existing
method getStyleArray, which does something completely different.

This change also increases coverage for all the Style classes to 100%,
with the exception of Style.php itself. There were several (unchanged)
places in Style.php where I did not have sufficient understanding of
what was supposed to be happening, so could not create tests.

All properties used by applyFromArray are exported by this method.
Note that conditional styles are not covered; this is consistent
with the fact that they are not covered by applyFromArray.

The method is implemented as a final public function in Style/Supervisor,
which calls abstract protected function exportArray1, which is implemented
in each of the subclasses, and which calls final protected
function exportArray2 in Style/Supervisor.
So exportArray is usable for any of the subclasses as well.

The new method is added to the documentation.
The existing documentation for applyFromArray was alphabetized to make
it easier to follow.
One property (Style quotePrefix) was added to the documentation.
Some Borders pseudo-properties (vertical, horizontal, and outline) were
documented as usable by applyFromArray,
but aren't actually supported - they were removed.
The documentation of the properties seemed to use setProperty and
getProperty fairly randomly - it now uses setProperty exclusively.

New constants were added for the textRotation "angles" used to create a
"stacked" cell. I felt that changing the readers and writers to use
these constants was beyond the scope of this change, but it is
on my to-do list.
2020-10-26 20:56:24 +01:00
..
images Update documentation with composer instructions 2017-03-13 12:30:26 +09:00
accessing-cells.md Code highlight in docs for PhpStorm 2020-05-31 22:44:25 +09:00
architecture.md Code highlight in docs for PhpStorm 2020-05-31 22:44:25 +09:00
autofilters.md Code highlight in docs for PhpStorm 2020-05-31 22:44:25 +09:00
calculation-engine.md Code highlight in docs for PhpStorm 2020-05-31 22:44:25 +09:00
creating-spreadsheet.md Code highlight in docs for PhpStorm 2020-05-31 22:44:25 +09:00
defined-names.md Named formula implementation, and improved handling of Defined Names generally (#1535) 2020-07-26 12:00:06 +02:00
file-formats.md Prefer https:// URLs when available in docs & comments 2018-10-28 13:55:00 +11:00
memory_saving.md Code highlight in docs for PhpStorm 2020-05-31 22:44:25 +09:00
migration-from-PHPExcel.md Code highlight in docs for PhpStorm 2020-05-31 22:44:25 +09:00
reading-and-writing-to-file.md Merge pull request #1499 from oleibman/htmledit 2020-06-28 17:46:56 +09:00
reading-files.md Code highlight in docs for PhpStorm 2020-05-31 22:44:25 +09:00
recipes.md Add exportArray Method for Styles (#1580) 2020-10-26 20:56:24 +01:00
settings.md WEBSERVICE is HTTP client agnostic 2020-07-19 11:33:01 +09:00
worksheets.md Code highlight in docs for PhpStorm 2020-05-31 22:44:25 +09:00