SimpleSAML\Error\ConfigurationError::__construct PHP Method

__construct() public method

ConfigurationError constructor.
public __construct ( string | null $reason = null, string | null $file = null, array $config = null )
$reason string | null The reason for this exception.
$file string | null The configuration file that originated this error.
$config array The configuration array that led to this problem.
    public function __construct($reason = null, $file = null, array $config = null)
    {
        $file_str = '';
        $reason_str = '.';
        $params = array('CONFIG');
        if ($file !== null) {
            $params['%FILE%'] = $file;
            $basepath = dirname(dirname(dirname(dirname(__FILE__)))) . '/';
            $file_str = '(' . str_replace($basepath, '', $file) . ') ';
        }
        if ($reason !== null) {
            $params['%REASON%'] = $reason;
            $reason_str = ': ' . $reason;
        }
        $this->reason = $reason;
        $this->config_file = $file;
        parent::__construct($params);
        $this->message = 'The configuration ' . $file_str . 'is invalid' . $reason_str;
    }