Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
5 / 5 |
|
100.00% |
3 / 3 |
CRAP | |
100.00% |
1 / 1 |
AbstractStyle | |
100.00% |
5 / 5 |
|
100.00% |
3 / 3 |
3 | |
100.00% |
1 / 1 |
setParentWriter | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
setXmlWriter | |
100.00% |
2 / 2 |
|
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\Style; |
20 | |
21 | use PhpOffice\PhpWord\Shared\XMLWriter; |
22 | use PhpOffice\PhpWord\Writer\AbstractWriter; |
23 | |
24 | /** |
25 | * Abstract class for EPub3 styles. |
26 | */ |
27 | abstract class AbstractStyle |
28 | { |
29 | /** |
30 | * Parent writer. |
31 | * |
32 | * @var AbstractWriter |
33 | */ |
34 | protected $parentWriter; |
35 | |
36 | /** |
37 | * XML Writer. |
38 | * |
39 | * @var XMLWriter |
40 | */ |
41 | protected $xmlWriter; |
42 | |
43 | /** |
44 | * Set parent writer. |
45 | */ |
46 | public function setParentWriter(AbstractWriter $writer): self |
47 | { |
48 | $this->parentWriter = $writer; |
49 | |
50 | return $this; |
51 | } |
52 | |
53 | /** |
54 | * Set XML Writer. |
55 | */ |
56 | public function setXmlWriter(XMLWriter $writer): self |
57 | { |
58 | $this->xmlWriter = $writer; |
59 | |
60 | return $this; |
61 | } |
62 | |
63 | /** |
64 | * Get parent writer. |
65 | */ |
66 | public function getParentWriter(): AbstractWriter |
67 | { |
68 | return $this->parentWriter; |
69 | } |
70 | |
71 | /** |
72 | * Write style content. |
73 | */ |
74 | abstract public function write(): string; |
75 | } |