Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| AbstractPart | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| setParentWriter | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getParentWriter | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| write | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | |||||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * This file is part of PHPWord - A pure PHP library for reading and writing |
| 5 | * word processing documents. |
| 6 | * |
| 7 | * PHPWord is free software distributed under the terms of the GNU Lesser |
| 8 | * General Public License version 3 as published by the Free Software Foundation. |
| 9 | * |
| 10 | * For the full copyright and license information, please read the LICENSE |
| 11 | * file that was distributed with this source code. For the full list of |
| 12 | * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. |
| 13 | * |
| 14 | * @see https://github.com/PHPOffice/PHPWord |
| 15 | * |
| 16 | * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 |
| 17 | */ |
| 18 | |
| 19 | namespace PhpOffice\PhpWord\Writer\EPub3\Part; |
| 20 | |
| 21 | use PhpOffice\PhpWord\Writer\AbstractWriter; |
| 22 | use PhpOffice\PhpWord\Writer\WriterPartInterface; |
| 23 | |
| 24 | /** |
| 25 | * Abstract class for EPub3 parts. |
| 26 | */ |
| 27 | abstract class AbstractPart implements WriterPartInterface |
| 28 | { |
| 29 | /** |
| 30 | * Parent writer. |
| 31 | * |
| 32 | * @var AbstractWriter |
| 33 | */ |
| 34 | protected $parentWriter; |
| 35 | |
| 36 | /** |
| 37 | * Set parent writer. |
| 38 | */ |
| 39 | public function setParentWriter(AbstractWriter $writer): void |
| 40 | { |
| 41 | $this->parentWriter = $writer; |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * Get parent writer. |
| 46 | */ |
| 47 | public function getParentWriter(): AbstractWriter |
| 48 | { |
| 49 | return $this->parentWriter; |
| 50 | } |
| 51 | |
| 52 | /** |
| 53 | * Write part content. |
| 54 | */ |
| 55 | abstract public function write(): string; |
| 56 | } |