ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilCertificateUtilHelper.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2018 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
11 {
17  public function deliverData(string $data, string $fileName, string $mimeType)
18  {
20  $data,
21  $fileName,
22  $mimeType
23  );
24  }
25 
30  public function prepareFormOutput(string $string) : string
31  {
32  return ilUtil::prepareFormOutput($string);
33  }
34 
42  public function convertImage(
43  string $from,
44  string $to,
45  string $targetFormat = '',
46  string $geometry = '',
47  string $backgroundColor = ''
48  ) {
49  return ilUtil::convertImage($from, $to, $targetFormat, $geometry, $backgroundColor);
50  }
51 
56  public function stripSlashes(string $string) : string
57  {
58  return ilUtil::stripSlashes($string);
59  }
60 
65  public function zip(string $exportPath, string $zipPath)
66  {
67  ilUtil::zip($exportPath, $zipPath);
68  }
69 
75  public function deliverFile(string $zipPath, string $zipFileName, string $mime)
76  {
77  ilUtil::deliverFile($zipPath, $zipFileName, $mime);
78  }
79 
84  public function getDir(string $copyDirectory) : array
85  {
86  return ilUtil::getDir($copyDirectory);
87  }
88 
93  public function unzip(string $file, bool $overwrite)
94  {
95  ilUtil::unzip($file, $overwrite);
96  }
97 
101  public function delDir(string $path)
102  {
103  ilUtil::delDir($path);
104  }
105 
115  public function moveUploadedFile(
116  string $file,
117  string $name,
118  string $target,
119  bool $raise_errors = true,
120  string $mode = 'move_uploaded'
121  ) {
122  return ilUtil::moveUploadedFile(
123  $file,
124  $name,
125  $target,
126  $raise_errors,
127  $mode
128  );
129  }
130 
138  public function getImagePath($img, $module_path = "", $mode = "output", $offline = false)
139  {
140  return ilUtil::getImagePath(
141  $img,
142  $module_path,
143  $mode,
144  $offline
145  );
146  }
147 }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
static deliverData($a_data, $a_filename, $mime="application/octet-stream", $charset="")
deliver data for download via browser.
$path
Definition: aliased.php:25
zip(string $exportPath, string $zipPath)
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
static getDir($a_dir, $a_rec=false, $a_sub_dir="")
get directory
$from
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 getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static convertImage( $a_from, $a_to, $a_target_format="", $a_geometry="", $a_background_color="")
convert image
getImagePath($img, $module_path="", $mode="output", $offline=false)
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static zip($a_dir, $a_file, $compress_content=false)
zips given directory/file into given zip.file
deliverData(string $data, string $fileName, string $mimeType)
Just a wrapper class to create Unit Test for other classes.
convertImage(string $from, string $to, string $targetFormat='', string $geometry='', string $backgroundColor='')
getDir(string $copyDirectory)
$target
Definition: test.php:19
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
$data
Definition: bench.php:6