ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
class.ilCertificateValueReplacement.php
Go to the documentation of this file.
1
<?
php
2
/* Copyright (c) 1998-2018 ILIAS open source, Extended GPL, see docs/LICENSE */
3
7
class
ilCertificateValueReplacement
8
{
12
private
$clientWebDirectory
;
13
19
public
function
__construct
(
string
$clientWebDirectory
=
''
)
20
{
21
if
(
''
===
$clientWebDirectory
&&
true
=== defined(
'CLIENT_WEB_DIR'
)) {
22
$clientWebDirectory
= CLIENT_WEB_DIR;
23
}
24
$this->clientWebDirectory =
$clientWebDirectory
;
25
}
26
34
public
function
replace
(array $placeholderValues,
string
$certificateContent) : string
35
{
36
foreach
($placeholderValues as $placeholder => $value) {
37
$certificateContent = str_replace(
'['
. $placeholder .
']'
, $value, $certificateContent);
38
}
39
40
return
$certificateContent;
41
}
42
}
ilCertificateValueReplacement\__construct
__construct(string $clientWebDirectory='')
Definition:
class.ilCertificateValueReplacement.php:19
ilCertificateValueReplacement
Definition:
class.ilCertificateValueReplacement.php:7
ilCertificateValueReplacement\replace
replace(array $placeholderValues, string $certificateContent)
Replaces placeholder in the certificate content with actual values.
Definition:
class.ilCertificateValueReplacement.php:34
ilCertificateValueReplacement\$clientWebDirectory
$clientWebDirectory
Definition:
class.ilCertificateValueReplacement.php:12
php
Services
Certificate
classes
Placeholder
Replacement
class.ilCertificateValueReplacement.php
Generated on Thu Jan 16 2025 19:02:18 for ILIAS by
1.8.13 (using
Doxyfile
)