ILIAS  release_8 Revision v8.23
ilCertificateUtilHelper.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
27 {
28  public function deliverData(string $data, string $fileName, string $mimeType): void
29  {
31  $data,
32  $fileName,
33  $mimeType
34  );
35  }
36 
37  public function prepareFormOutput(string $string): string
38  {
40  }
41 
42  public function convertImage(
43  string $from,
44  string $to,
45  string $targetFormat = '',
46  string $geometry = '',
47  string $backgroundColor = ''
48  ): void {
49  ilShellUtil::convertImage($from, $to, $targetFormat, $geometry, $backgroundColor);
50  }
51 
52  public function stripSlashes(string $string): string
53  {
54  return ilUtil::stripSlashes($string);
55  }
56 
57  public function zip(string $exportPath, string $zipPath): void
58  {
59  ilFileUtils::zip($exportPath, $zipPath);
60  }
61 
62  public function deliverFile(string $zipPath, string $zipFileName, string $mime): void
63  {
64  ilFileDelivery::deliverFileLegacy($zipPath, $zipFileName, $mime);
65  }
66 
67  public function getDir(string $copyDirectory): array
68  {
69  return ilFileUtils::getDir($copyDirectory);
70  }
71 
72  public function unzip(string $file, bool $overwrite): void
73  {
74  ilFileUtils::unzip($file, $overwrite);
75  }
76 
77  public function delDir(string $path): void
78  {
79  ilFileUtils::delDir($path);
80  }
81 
91  public function moveUploadedFile(
92  string $file,
93  string $name,
94  string $target,
95  bool $raise_errors = true,
96  string $mode = 'move_uploaded'
97  ): bool {
99  $file,
100  $name,
101  $target,
102  $raise_errors,
103  $mode
104  );
105  }
106 
107  public function getImagePath(
108  string $img,
109  string $module_path = "",
110  string $mode = "output",
111  bool $offline = false
112  ): string {
113  return ilUtil::getImagePath(
114  $img,
115  $module_path,
116  $mode,
117  $offline
118  );
119  }
120 }
zip(string $exportPath, string $zipPath)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static deliverData(string $a_data, string $a_filename, string $mime="application/octet-stream")
static prepareFormOutput($a_str, bool $a_strip=false)
getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
$path
Definition: ltiservices.php:32
static unzip(string $path_to_zip_file, bool $overwrite_existing=false, bool $unpack_flat=false)
static deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)
if($format !==null) $name
Definition: metadata.php:247
moveUploadedFile(string $file, string $name, string $target, bool $raise_errors=true, string $mode='move_uploaded')
unzip(string $file, bool $overwrite)
deliverFile(string $zipPath, string $zipFileName, string $mime)
static delDir(string $a_dir, bool $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static getDir(string $a_dir, bool $a_rec=false, ?string $a_sub_dir="")
get directory
static moveUploadedFile(string $a_file, string $a_name, string $a_target, bool $a_raise_errors=true, string $a_mode="move_uploaded")
move uploaded file
static convertImage(string $a_from, string $a_to, string $a_target_format="", string $a_geometry="", string $a_background_color="")
convert image
deliverData(string $data, string $fileName, string $mimeType)
$img
Definition: imgupload.php:83
Just a wrapper class to create Unit Test for other classes.
convertImage(string $from, string $to, string $targetFormat='', string $geometry='', string $backgroundColor='')
static zip(string $a_dir, string $a_file, bool $compress_content=false)
zips given directory/file into given zip.file
getDir(string $copyDirectory)