19declare(strict_types=1);
41 $this->installionId = $installationId;
48 if (
'crs' === $iliasType) {
50 } elseif (
'tst' === $iliasType) {
52 } elseif (
'exc' === $iliasType) {
54 } elseif (
'sahs' === $iliasType) {
66 $directory = $this->webDirectory . $this->certificatePath . time() .
'__' . $this->installionId .
'__' .
$type .
'__' . $certificateId .
'__certificate/';
81 fwrite($fh, $pdfdata);
87 $zipFile = time() .
'__' . $this->installionId .
'__' . $this->typeInFileName .
'__' . $this->objectId .
'__certificates.zip';
88 $zipFilePath = $this->webDirectory . $this->certificatePath . $zipFile;
static deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)
static makeDirParents(string $a_dir)
Create a new directory and all parent directories.
static zip(string $a_dir, string $a_file, bool $compress_content=false)
zips given directory/file into given zip.file
static delDir(string $a_dir, bool $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static _lookupType(int $id, bool $reference=false)
__construct(int $objectId, string $certificatePath, string $webDirectory=CLIENT_WEB_DIR, string $installationId=IL_INST_ID)
addPDFtoArchiveDirectory(string $pdfdata, string $dir, string $filename)
Adds PDF data as a file to a given directory.
zipCertificatesInArchiveDirectory(string $dir, bool $deliver=true)