ILIAS  release_8 Revision v8.24
ilCertificateUtilHelper.php
Go to the documentation of this file.
1<?php
2
19declare(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 {
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 {
98 return ilFileUtils::moveUploadedFile(
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}
Just a wrapper class to create Unit Test for other classes.
deliverFile(string $zipPath, string $zipFileName, string $mime)
getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
deliverData(string $data, string $fileName, string $mimeType)
convertImage(string $from, string $to, string $targetFormat='', string $geometry='', string $backgroundColor='')
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 deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)
Class ilFileUtils.
static unzip(string $path_to_zip_file, bool $overwrite_existing=false, bool $unpack_flat=false)
static getDir(string $a_dir, bool $a_rec=false, ?string $a_sub_dir="")
get directory
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 prepareFormOutput($a_str, bool $a_strip=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Util class various functions, usage as namespace.
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
static deliverData(string $a_data, string $a_filename, string $mime="application/octet-stream")
return['3gp', '7z', 'ai', 'aif', 'aifc', 'aiff', 'au', 'arw', 'avi', 'backup', 'bak', 'bas', 'bpmn', 'bpmn2', 'bmp', 'bib', 'bibtex', 'bz', 'bz2', 'c', 'c++', 'cc', 'cct', 'cdf', 'cer', 'class', 'cls', 'conf', 'cpp', 'crt', 'crs', 'crw', 'cr2', 'css', 'cst', 'csv', 'cur', 'db', 'dcr', 'des', 'dng', 'doc', 'docx', 'dot', 'dotx', 'dtd', 'dvi', 'el', 'eps', 'epub', 'f', 'f77', 'f90', 'flv', 'for', 'g3', 'gif', 'gl', 'gan', 'ggb', 'gsd', 'gsm', 'gtar', 'gz', 'gzip', 'h', 'hpp', 'htm', 'html', 'htmls', 'ibooks', 'ico', 'ics', 'ini', 'ipynb', 'java', 'jbf', 'jpeg', 'jpg', 'js', 'jsf', 'jso', 'json', 'latex', 'lang', 'less', 'log', 'lsp', 'ltx', 'm1v', 'm2a', 'm2v', 'm3u', 'm4a', 'm4v', 'markdown', 'm', 'mat', 'md', 'mdl', 'mdown', 'mid', 'min', 'midi', 'mobi', 'mod', 'mov', 'movie', 'mp2', 'mp3', 'mp4', 'mpa', 'mpeg', 'mpg', 'mph', 'mpga', 'mpp', 'mpt', 'mpv', 'mpx', 'mv', 'mw', 'mv4', 'nb', 'nbp', 'nef', 'nif', 'niff', 'obj', 'obm', 'odt', 'ods', 'odp', 'odg', 'odf', 'oga', 'ogg', 'ogv', 'old', 'p', 'pas', 'pbm', 'pcl', 'pct', 'pcx', 'pdf', 'pgm', 'pic', 'pict', 'png', 'por', 'pov', 'project', 'properties', 'ppa', 'ppm', 'pps', 'ppsx', 'ppt', 'pptx', 'ppz', 'ps', 'psd', 'pwz', 'qt', 'qtc', 'qti', 'qtif', 'r', 'ra', 'ram', 'rar', 'rast', 'rda', 'rev', 'rexx', 'ris', 'rf', 'rgb', 'rm', 'rmd', 'rmi', 'rmm', 'rmp', 'rt', 'rtf', 'rtx', 'rv', 's', 's3m', 'sav', 'sbs', 'sec', 'sdml', 'sgm', 'sgml', 'smi', 'smil', 'srt', 'sps', 'spv', 'stl', 'svg', 'swa', 'swf', 'swz', 'tar', 'tex', 'texi', 'texinfo', 'text', 'tgz', 'tif', 'tiff', 'ttf', 'txt', 'tmp', 'uvproj', 'vdf', 'vimeo', 'viv', 'vivo', 'vrml', 'vsdx', 'wav', 'webm', 'wmv', 'wmx', 'wmz', 'woff', 'wwd', 'xhtml', 'xif', 'xls', 'xlsx', 'xmind', 'xml', 'xsl', 'xsd', 'zip']
$img
Definition: imgupload.php:83
$path
Definition: ltiservices.php:32
if($format !==null) $name
Definition: metadata.php:247