ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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 ) {
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 {
141 $img,
142 $module_path,
143 $mode,
144 $offline
145 );
146 }
147}
An exception for terminatinating execution or to throw for unit testing.
Just a wrapper class to create Unit Test for other classes.
deliverFile(string $zipPath, string $zipFileName, string $mime)
deliverData(string $data, string $fileName, string $mimeType)
convertImage(string $from, string $to, string $targetFormat='', string $geometry='', string $backgroundColor='')
getImagePath($img, $module_path="", $mode="output", $offline=false)
getDir(string $copyDirectory)
zip(string $exportPath, string $zipPath)
moveUploadedFile(string $file, string $name, string $target, bool $raise_errors=true, string $mode='move_uploaded')
unzip(string $file, bool $overwrite)
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static convertImage( $a_from, $a_to, $a_target_format="", $a_geometry="", $a_background_color="")
convert image
static deliverData($a_data, $a_filename, $mime="application/octet-stream", $charset="")
deliver data for download via browser.
static zip($a_dir, $a_file, $compress_content=false)
zips given directory/file into given zip.file
static getDir($a_dir, $a_rec=false, $a_sub_dir="")
get directory
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
if($format !==null) $name
Definition: metadata.php:230
$data
Definition: storeScorm.php:23