ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
AuthSource.php
Go to the documentation of this file.
1 <?php
9 {
10 
11 
15  private $authsource;
16 
17 
21  private $reason;
22 
23 
30  public function __construct($authsource, $reason, $cause = null)
31  {
32  assert(is_string($authsource));
33  assert(is_string($reason));
34 
35  $this->authsource = $authsource;
36  $this->reason = $reason;
37  parent::__construct(
38  array(
39  'AUTHSOURCEERROR',
40  '%AUTHSOURCE%' => htmlspecialchars(var_export($this->authsource, true)),
41  '%REASON%' => htmlspecialchars(var_export($this->reason, true))
42  ),
43  $cause
44  );
45 
46  $this->message = "Error with authentication source '$authsource': $reason";
47  }
48 
49 
55  public function getAuthSource()
56  {
57  return $this->authsource;
58  }
59 
60 
66  public function getReason()
67  {
68  return $this->reason;
69  }
70 }
__construct($authsource, $reason, $cause=null)
Create a new AuthSource error.
Definition: AuthSource.php:30
getReason()
Retrieve the reason why the request was invalid.
Definition: AuthSource.php:66
getAuthSource()
Retrieve the authsource module name from where this error was thrown.
Definition: AuthSource.php:55
$authsource
Authsource module name.
Definition: AuthSource.php:15
$reason
Reason why this request was invalid.
Definition: AuthSource.php:21