Make \Request::get
more performant.
This commit is contained in:
parent
ce3682190c
commit
41627138de
@ -692,7 +692,17 @@ class Request
|
|||||||
*/
|
*/
|
||||||
public function get($key, $default = null, $deep = false)
|
public function get($key, $default = null, $deep = false)
|
||||||
{
|
{
|
||||||
return $this->query->get($key, $this->attributes->get($key, $this->request->get($key, $default, $deep), $deep), $deep);
|
$result = $this->query($key, $this, $deep);
|
||||||
|
if ($result === $this) {
|
||||||
|
$result = $this->attributes->get($key, $this, $deep);
|
||||||
|
}
|
||||||
|
if ($result === $this) {
|
||||||
|
$result = $this->request->get($key, $this, $deep);
|
||||||
|
}
|
||||||
|
if ($result === $this) {
|
||||||
|
return $default;
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user