24 if (!is_string(
$path)) {
25 throw new \InvalidArgumentException(
'Invalid input parameters.');
52 if ($secretSalt ===
'defaultsecretsalt') {
53 throw new \InvalidArgumentException(
'The "secretsalt" configuration option must be set to a secret value.');
67 public static function getConfigDir()
69 $configDir = dirname(dirname(dirname(__DIR__))) .
'/config';
71 $configDirEnv = getenv(
'SIMPLESAMLPHP_CONFIG_DIR');
72 if ($configDirEnv !==
false) {
73 if (!is_dir($configDirEnv)) {
74 throw new \InvalidArgumentException(
76 'Config directory specified by environment variable SIMPLESAMLPHP_CONFIG_DIR is not a ' .
77 'directory. Given: "%s"',
82 $configDir = $configDirEnv;
static getSecretSalt()
Retrieve the secret salt.
static resolvePath($path, $base=null)
Resolve a (possibly) relative path from the given base path.
static getCertPath($path)
Resolves a path that may be relative to the cert-directory.
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.