concrete5 way for $_FILES, $_POST, $_SERVER

What’s the concrete5 equivalent to

if (empty($_FILES) && 
    empty($_POST) && 
    isset($_SERVER['REQUEST_METHOD']) && 
    strtolower($_SERVER['REQUEST_METHOD']) == 'post') {

in way of requests?

[UPDATE] 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') {

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *