Last change
on this file since 347 was 347, checked in by roby, 3 years ago |
Aggiornamento per compatibilità con php7.4
|
File size:
1.2 KB
|
Line | |
---|
1 | <?php
|
---|
2 | /**
|
---|
3 | * Html2Pdf Library - Tag class
|
---|
4 | *
|
---|
5 | * HTML => PDF converter
|
---|
6 | * distributed under the OSL-3.0 License
|
---|
7 | *
|
---|
8 | * @package Html2pdf
|
---|
9 | * @author Laurent MINGUET <webmaster@html2pdf.fr>
|
---|
10 | * @copyright 2017 Laurent MINGUET
|
---|
11 | */
|
---|
12 | namespace Spipu\Html2Pdf\Tag;
|
---|
13 |
|
---|
14 | /**
|
---|
15 | * Abstract Default Tag
|
---|
16 | * used by all the simple tags like b, u, i, ...
|
---|
17 | */
|
---|
18 | abstract class AbstractHtmlTag extends AbstractTag
|
---|
19 | {
|
---|
20 | /**
|
---|
21 | * Open the HTML tag
|
---|
22 | *
|
---|
23 | * @param array $properties properties of the HTML tag
|
---|
24 | *
|
---|
25 | * @return boolean
|
---|
26 | */
|
---|
27 | public function open($properties)
|
---|
28 | {
|
---|
29 | $this->parsingCss->save();
|
---|
30 | $this->overrideStyles();
|
---|
31 | $this->parsingCss->analyse($this->getName(), $properties);
|
---|
32 | $this->parsingCss->setPosition();
|
---|
33 | $this->parsingCss->fontSet();
|
---|
34 |
|
---|
35 | return true;
|
---|
36 | }
|
---|
37 |
|
---|
38 | /**
|
---|
39 | * override some styles
|
---|
40 | *
|
---|
41 | * @return $this
|
---|
42 | */
|
---|
43 | protected function overrideStyles()
|
---|
44 | {
|
---|
45 | return $this;
|
---|
46 | }
|
---|
47 |
|
---|
48 | /**
|
---|
49 | * Close the HTML tag
|
---|
50 | *
|
---|
51 | * @param array $properties properties of the HTML tag
|
---|
52 | *
|
---|
53 | * @return boolean
|
---|
54 | */
|
---|
55 | public function close($properties)
|
---|
56 | {
|
---|
57 | $this->parsingCss->load();
|
---|
58 | $this->parsingCss->fontSet();
|
---|
59 |
|
---|
60 | return true;
|
---|
61 | }
|
---|
62 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.