17 private $http_request;
36 $this->http_request = $http_request;
46 return $this->validation;
55 return $this->getParam(
'_route');
66 return $this->http_request->getParams(
$filter);
104 $guid = (int) $this->http_request->getParam(
$key);
120 $prop = $this->http_request->getParam(
$key);
125 if (
$key ===
'username') {
146 return $this->http_request->getCurrentURL();
154 return implode(
'/', $this->http_request->getUrlSegments());
162 return $this->http_request->isXmlHttpRequest();
170 return $this->http_request->getMethod();
179 return $this->http_request;
getHttpRequest()
Get the HttpRequest for this request.
getURL()
Get URL of the request.
validation()
Access validation results bag.
setParam($key, $value=null)
Set request parameter.
elgg_get_user_by_username(string $username, bool $try_email=false)
Get a user by username.
__construct(PublicContainer $dic, HttpRequest $http_request)
Constructor.
Represents a set of validated parameters.
getUserParam(string $key= 'user_guid')
Gets the "user" key from the params if it holds an Elgg user.
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.
getMethod()
Get HTTP method of the request.
getEntityParam(string $key= 'guid')
Gets the "entity" key from the params if it holds an Elgg entity.
get_entity(int $guid)
Loads and returns an entity object from a guid.
elgg()
Get the DI container.
get_user(int $guid)
Elgg users Functions to manage multiple or single users in an Elgg install.
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.
$guid
Reset an ElggUpgrade.