summaryrefslogtreecommitdiff
path: root/src/Latex.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2024-08-13 23:45:21 +0200
committerpolo <ordipolo@gmx.fr>2024-08-13 23:45:21 +0200
commitbf6655a534a6775d30cafa67bd801276bda1d98d (patch)
treec6381e3f6c81c33eab72508f410b165ba05f7e9c /src/Latex.php
parent94d67a4b51f8e62e7d518cce26a526ae1ec48278 (diff)
downloadAppliGestionPHP-bf6655a534a6775d30cafa67bd801276bda1d98d.zip
VERSION 0.2 doctrine ORM et entités
Diffstat (limited to 'src/Latex.php')
-rw-r--r--src/Latex.php19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/Latex.php b/src/Latex.php
index f7f18ea..b254551 100644
--- a/src/Latex.php
+++ b/src/Latex.php
@@ -5,12 +5,12 @@
5 5
6abstract class Latex 6abstract class Latex
7{ 7{
8 protected $type = ''; 8 protected string $type;
9 protected $file_name = ''; 9 protected string $file_name;
10 protected $latex_path = ''; 10 protected string $latex_path;
11 protected $pdf_path = ''; 11 protected string $pdf_path;
12 protected $data = []; // données à insérer dans le template 12 protected array $data = []; // données à insérer dans le template
13 protected $latex = ''; // latex pur 13 protected string $latex; // latex pur
14 14
15 static function makeInstance(string $type) 15 static function makeInstance(string $type)
16 { 16 {
@@ -98,16 +98,13 @@ abstract class Latex
98 98
99abstract class PrestaLatex extends Latex 99abstract class PrestaLatex extends Latex
100{ 100{
101 protected $Date; // sera un type "Dates" 101 protected Dates $Date;
102
103 //~ public function __construct()
104 //~ {}
105 102
106 public function setData(Object $Object): self 103 public function setData(Object $Object): self
107 { 104 {
108 $this->data = array_merge($this->data, $Object->getAll()); // nécessite des tableaux associatifs 105 $this->data = array_merge($this->data, $Object->getAll()); // nécessite des tableaux associatifs
109 106
110 if(get_class($Object) === 'Prestations') 107 if(get_class($Object) === 'Prestation')
111 { 108 {
112 $this->file_name = $Object->getCodePresta() . '.tex'; 109 $this->file_name = $Object->getCodePresta() . '.tex';
113 $this->makeDateInstance($Object->getDate()); // paramètre = int 110 $this->makeDateInstance($Object->getDate()); // paramètre = int