ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
initMDSPdo.php
Go to the documentation of this file.
1
#!/usr/bin/env php
2
<?php
3
4
// This is the base directory of the SimpleSAMLphp installation
5
$baseDir
= dirname(dirname(__FILE__));
6
7
// Add library autoloader and configuration
8
require_once
$baseDir
.DIRECTORY_SEPARATOR.
'lib'
.DIRECTORY_SEPARATOR.
'_autoload.php'
;
9
require_once SimpleSAML\Utils\Config::getConfigDir().DIRECTORY_SEPARATOR.
'config.php'
;
10
11
echo
"Initializing Metadata Database..."
.PHP_EOL;
12
13
# Iterate through configured metadata sources and ensure
14
# that a PDO source exists.
15
foreach
(
$config
[
'metadata.sources'
] as
$source
) {
16
# If pdo is configured, create the new handler and initialize the DB.
17
if
($source[
'type'
] ===
"pdo"
) {
18
$metadataStorageHandler =
new
SimpleSAML_Metadata_MetaDataStorageHandlerPdo
($source);
19
$result
= $metadataStorageHandler->initDatabase();
20
21
if
(
$result
===
false
) {
22
echo
"Failed to initialize metadata database."
.PHP_EOL;
23
}
else
{
24
echo
"Successfully initialized metadata database."
.PHP_EOL;
25
}
26
}
27
}
$config
$config
Definition:
flush-definition-cache.php:23
$result
$result
Definition:
CleanUpTest.php:463
SimpleSAML_Metadata_MetaDataStorageHandlerPdo
Definition:
MetaDataStorageHandlerPdo.php:14
$source
$source
Definition:
linkback.php:22
$baseDir
$baseDir
Definition:
initMDSPdo.php:5
libs
composer
vendor
simplesamlphp
simplesamlphp
bin
initMDSPdo.php
Generated on Sat Jan 18 2025 19:01:09 for ILIAS by
1.8.13 (using
Doxyfile
)