Add env method to request
This commit is contained in:
parent
40e64ef9b7
commit
a047e15f7e
1 changed files with 11 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Runtime\Http;
|
||||
|
||||
use Runtime\Config\Env;
|
||||
use Runtime\Exceptions\Exceptions\MalformedUrlException;
|
||||
use Runtime\Http\Input\InputHandler;
|
||||
use Runtime\Router\Route\ILoadableRoute;
|
||||
|
@ -224,6 +225,16 @@ class Request
|
|||
return $this->inputHandler;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get env variable
|
||||
* @param $key
|
||||
* @return string
|
||||
*/
|
||||
public function getEnv($key)
|
||||
{
|
||||
return Env::get($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is format accepted
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue