19 declare(strict_types=1);
32 public function copy(
string $sourcePath,
string $destinationPath, array $placeholders = []): void
34 if (!$this->fs->has($destinationPath)) {
35 $templateContents = file_get_contents($sourcePath);
37 foreach ($placeholders as $placeholder => $value) {
38 if (is_callable($value)) {
42 $templateContents = str_replace(
'[[' . $placeholder .
']]', $value, $templateContents);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
copy(string $sourcePath, string $destinationPath, array $placeholders=[])
static getDataDir()
get data directory (outside webspace)
__construct(private Filesystem $fs)