diff options
Diffstat (limited to 'src/Latex.php')
| -rw-r--r-- | src/Latex.php | 19 |
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 | ||
| 6 | abstract class Latex | 6 | abstract 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 | ||
| 99 | abstract class PrestaLatex extends Latex | 99 | abstract 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 |
