| Total Complexity | 6 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | class Tcpdf extends \TCPDF |
||
| 21 | { |
||
| 22 | private $headerFcn; |
||
| 23 | private $footerFcn; |
||
| 24 | |||
| 25 | |||
| 26 | /** |
||
| 27 | * Adds the footer to each page |
||
| 28 | */ |
||
| 29 | public function Footer() |
||
| 33 | } |
||
| 34 | } |
||
| 35 | |||
| 36 | |||
| 37 | /** |
||
| 38 | * Adds the header to each page |
||
| 39 | */ |
||
| 40 | public function Header() |
||
| 41 | { |
||
| 42 | if( $fcn = $this->headerFcn ) { |
||
| 43 | $fcn( $this ); |
||
| 44 | } |
||
| 45 | } |
||
| 46 | |||
| 47 | |||
| 48 | /** |
||
| 49 | * Sets the anonymous function which adds the page footer |
||
| 50 | * |
||
| 51 | * @param \Closure $fcn Function that adds the page footer |
||
| 52 | * @return \Aimeos\Client\Html\Email\Payment\Pdf\Tcpdf Same object for method chaining |
||
| 53 | */ |
||
| 54 | public function setFooterFunction( \Closure $fcn ) |
||
| 58 | } |
||
| 59 | |||
| 60 | |||
| 61 | /** |
||
| 62 | * Sets the anonymous function which adds the page header |
||
| 63 | * |
||
| 64 | * @param \Closure $fcn Function that adds the page header |
||
| 65 | * @return \Aimeos\Client\Html\Email\Payment\Pdf\Tcpdf Same object for method chaining |
||
| 66 | */ |
||
| 67 | public function setHeaderFunction( \Closure $fcn ) |
||
| 71 | } |
||
| 72 | } |
||
| 73 |