19 declare(strict_types=1);
36 public function copy(
string $sourcePath,
string $destinationPath, array $placeholders = []): void
38 if (!$this->fs->has($destinationPath)) {
39 $templateContents = file_get_contents($sourcePath);
41 foreach ($placeholders as $placeholder => $value) {
42 if (is_callable($value)) {
46 $templateContents = str_replace(
'[[' . $placeholder .
']]', $value, $templateContents);
copy(string $sourcePath, string $destinationPath, array $placeholders=[])
static getDataDir()
get data directory (outside webspace)
__construct(private readonly Filesystem $fs)
Class ilSimpleSAMLphpConfigTemplateHandler.