ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
importPdoMetadata.php
Go to the documentation of this file.
1
#!/usr/bin/env php
2
<?
php
3
$baseDir
= dirname(dirname(__FILE__));
4
5
require_once
$baseDir
.DIRECTORY_SEPARATOR.
'lib'
.DIRECTORY_SEPARATOR.
'_autoload.php'
;
6
require_once SimpleSAML\Utils\Config::getConfigDir().DIRECTORY_SEPARATOR.
'config.php'
;
7
8
# Iterate through configured metadata sources and ensure
9
# that a PDO source exists.
10
foreach
(
$config
[
'metadata.sources'
] as
$s
) {
11
# If pdo is configured, create the new handler and add in the metadata sets.
12
if
($s[
'type'
] ===
"pdo"
) {
13
$mdshp =
new
SimpleSAML_Metadata_MetaDataStorageHandlerPdo
($s);
14
$mdshp->initDatabase();
15
16
foreach
(glob(
"metadata/*.php"
) as
$filename
) {
17
$metadata
= array();
18
require_once
$filename
;
19
$set = basename($filename,
".php"
);
20
echo
"importing set '$set'..."
.PHP_EOL;
21
22
foreach
(
$metadata
as $k => $v) {
23
echo
"\t$k"
.PHP_EOL;
24
$mdshp->addEntry($k, $set, $v);
25
}
26
}
27
}
28
}
$config
$config
Definition:
bootstrap.php:15
$baseDir
$baseDir
Definition:
importPdoMetadata.php:3
$s
$s
Definition:
pwgen.php:45
$metadata
$metadata['__DYNAMIC:1__']
Definition:
adfs-idp-hosted.php:3
SimpleSAML_Metadata_MetaDataStorageHandlerPdo
Definition:
MetaDataStorageHandlerPdo.php:13
$filename
$filename
Definition:
buildRTE.php:89
echo
php
libs
composer
vendor
simplesamlphp
simplesamlphp
bin
importPdoMetadata.php
Generated on Thu Feb 27 2025 19:01:32 for ILIAS by
1.8.13 (using
Doxyfile
)