18 private $http_request;
37 $this->http_request = $http_request;
47 return $this->validation;
56 return $this->getParam(
'_route');
67 return $this->http_request->getParams(
$filter);
105 $guid = $this->http_request->getParam(
$key);
124 $prop = $this->http_request->getParam(
$key);
125 if (
$key ===
'username') {
155 return $this->http_request->getCurrentURL();
163 return implode(
'/', $this->http_request->getUrlSegments());
171 return $this->http_request->isXmlHttpRequest();
179 return $this->http_request->getMethod();
getURL()
Get URL of the request.
validation()
Access validation results bag.
setParam($key, $value=null)
Set request parameter.
__construct(PublicContainer $dic, HttpRequest $http_request)
Constructor.
getEntityParam($key= 'guid')
Gets the "entity" key from the params if it holds an Elgg entity.
Represents a set of validated parameters.
$guid
Removes an admin notice.
getParams($filter=true)
Get the parameters from the request query and route matches.
getParam($key, $default=null, $filter=true)
Get an element of the params array.
isXhr()
Is the route access with XmlHttpRequest.
get_user_by_username($username)
Get user by username.
getMethod()
Get HTTP method of the request.
elgg()
Get the DI container.
if($container instanceof ElggGroup &&$container->guid!=elgg_get_page_owner_guid()) $key
getRoute()
Get the name of the route.
getPath()
Get relative path of the request.
getUserParam($key= 'user_guid')
Gets the "user" key from the params if it holds an Elgg user.
get_entity($guid)
Loads and returns an entity object from a guid.