Elgg  Version 3.0
HttpException.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg;
4 
8 class HttpException extends \Exception {
9 
13  protected $params = [];
14 
18  protected $url;
19 
27  public function setParams(array $params = []) {
28  $this->params = $params;
29  }
30 
35  public function getParams() {
36  return $this->params;
37  }
38 
44  public function getParam($name) {
45  return elgg_extract($name, $this->params);
46  }
47 
55  public function setRedirectUrl($url) {
56  $this->url = $url;
57  }
58 
63  public function getRedirectUrl() {
64  return $this->url;
65  }
66 }
Generic HTTP exception.
getParams()
Retrieve exception parameters.
if(!$user||!$user->canDelete()) $name
Definition: delete.php:22
getParam($name)
Get a parameter value.
$params
Saves global plugin settings.
Definition: save.php:13
Configuration exception.
$url
Definition: default.php:33
setRedirectUrl($url)
Set preferred redirect URL If set, a redirect response will be issued.
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1131
getRedirectUrl()
Get preferred redirect URL.
$CONFIG url
The full URL where Elgg is installed.
Definition: config.php:38
setParams(array $params=[])
Set params to provide context about the exception.