ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
BadRequest.php
Go to the documentation of this file.
1<?php
2
13
14
18 private $reason;
19
20
26 public function __construct($reason) {
27 assert('is_string($reason)');
28
29 $this->reason = $reason;
30 parent::__construct(array('BADREQUEST', '%REASON%' => $this->reason));
31 $this->httpCode = 400;
32 }
33
34
40 public function getReason() {
41 return $this->reason;
42 }
43
44}
An exception for terminatinating execution or to throw for unit testing.
getReason()
Retrieve the reason why the request was invalid.
Definition: BadRequest.php:40
$reason
Reason why this request was invalid.
Definition: BadRequest.php:18
__construct($reason)
Create a new BadRequest error.
Definition: BadRequest.php:26