From 63365247e23c206bc9eea63a224447543f1ec9b5 Mon Sep 17 00:00:00 2001 From: polo Date: Mon, 12 Oct 2026 21:42:42 +0200 Subject: =?UTF-8?q?pr=C3=A9paration=20date=20bulletin=20de=20paie=20des=20?= =?UTF-8?q?CESU,=20relecture?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/File.php | 101 ----------------------------------------------------- 1 file changed, 101 deletions(-) delete mode 100644 src/model/File.php (limited to 'src/model/File.php') diff --git a/src/model/File.php b/src/model/File.php deleted file mode 100644 index 31691dc..0000000 --- a/src/model/File.php +++ /dev/null @@ -1,101 +0,0 @@ -file_name = $file_name; - $this->path = $path; - } - - // getters - public function getData(): string - { - return $this->data; - } - - // setters - public function setFileName($file_name) - { - $this->file_name = $file_name; - } - - public function setPath($path) - { - $this->path = $path; - } - - public function setData($data) - { - $this->data = $data; - } - - public function setFileRights(int $octal) - { - $this->file_rights($octal); - } - public function setFolderRights(int $octal) - { - $this->folder_rights($octal); - } - - public function setWriteMod(int $mod) - { - $this->write_mod = $mod; - } - - - // fichiers - public function readFile(): string - {} - - public function writeFile() - { - file_put_contents($this->path. $this->file_name, $data); - chmod($this->path, $this->file_rights); - } - - - // dossiers - public function makeFolder() - { - if(!file_exists($this->path)) - { - mkdir($this->path); - chmod($this->path, $this->folder_rights); - } - } -} - -// compilation à partir d'un fichier .tex -class latexToPdf extends File -{ - public function __construct(string $latex_path, string $file_name, string $pdf_path) - {} - - $output_dir = ''; - if($pdf_path !== '') - { - $output_dir = '-output-directory=' . $pdf_path . ' '; - } - - // compilation - //echo 'pdflatex ' . $output_dir . $latex_path . $file_name . "\n"; - exec('pdflatex ' . $output_dir . $latex_path . $file_name); - - // nettoyage - $basename = basename($file_name, '.tex'); - unlink($pdf_path . $basename . '.aux'); - unlink($pdf_path . $basename . '.log'); -} -- cgit v1.2.3