8.4.2: concrete5 way for $_FILES, $_POST, $_SERVER

Permalink
What's the equivalent to
if (empty($_FILES) && empty($_POST) && isset($_SERVER['REQUEST_METHOD']) && strtolower($_SERVER['REQUEST_METHOD']) == 'post') {

in concrete5 way of requests?

The $_POST is $this->request->request->get()
The $_FILES is probably $this->request->files
Don't know what the $_SERVER may be, $this->app->request->server->get('REQUEST_METHOD') returns NULL

linuxoid
 
linuxoid replied on at Permalink Reply
linuxoid
Looks like this is working:
if (empty($this->request->files->all()) && 
    empty($this->request->request->all()) && 
    null !== $this->request->server->get('REQUEST_METHOD') && 
    strtolower($this->request->server->get('REQUEST_METHOD')) == 'post') {