ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
CriticalConfigurationError.php
Go to the documentation of this file.
1 <?php
21 namespace SimpleSAML\Error;
22 
24 {
25 
31  private static $minimum_config = array(
32  'logging.handler' => 'errorlog',
33  'logging.level' => \SimpleSAML\Logger::DEBUG,
34  'errorreporting' => false,
35  'debug' => true,
36  );
37 
38 
46  public function __construct($reason = null, $file = null, $config = null)
47  {
48  if ($config === null) {
49  $config = self::$minimum_config;
51  }
52 
54  $config,
55  '',
56  'simplesaml'
57  );
58  parent::__construct($reason, $file);
59  }
60 
61 
67  public static function fromException(\Exception $exception)
68  {
69  $reason = null;
70  $file = null;
71  if ($exception instanceof ConfigurationError) {
72  $reason = $exception->getReason();
73  $file = $exception->getConfFile();
74  } else {
75  $reason = $exception->getMessage();
76  }
77  return new CriticalConfigurationError($reason, $file);
78  }
79 }
$config
Definition: bootstrap.php:15
__construct($reason=null, $file=null, $config=null)
CriticalConfigurationError constructor.
Attribute-related utility methods.
static guessBasePath()
Try to guess the base SimpleSAMLphp path from the current request.
Definition: HTTP.php:562
static loadFromArray($config, $location='[ARRAY]', $instance=null)
Loads a configuration from the given array.