mirror of
https://github.com/flarum/core.git
synced 2025-10-18 18:26:07 +02:00
Convert the rest of the API to new action architecture
Also make some tweaks: - Merge SerializeAction::$include and SerializeAction::$includeAvailable into a keyed boolean array - Set defaults for SerializeAction::$limit and $limitMax - Rename SerializeAction::$sortAvailable to $sortFields
This commit is contained in:
@@ -9,17 +9,17 @@ class Request
|
||||
|
||||
public $actor;
|
||||
|
||||
public $httpRequest;
|
||||
public $http;
|
||||
|
||||
public function __construct(array $input, Actor $actor, IlluminateRequest $httpRequest = null)
|
||||
public function __construct(array $input, Actor $actor, IlluminateRequest $http = null)
|
||||
{
|
||||
$this->input = $input;
|
||||
$this->actor = $actor;
|
||||
$this->httpRequest = $httpRequest;
|
||||
$this->http = $http;
|
||||
}
|
||||
|
||||
public function get($key, $default = null)
|
||||
{
|
||||
return isset($this->input[$key]) ? $this->input[$key] : $default;
|
||||
return array_get($this->input, $key, $default);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user