public function getValuesAsArray()
    {
        //converts the files array with multiple values into PHP's ugly format
        //http://php.net/manual/en/reserved.variables.files.php#89674
        if ($this->files) {
            $parsedFileArray = [];
            foreach ($this->files as $name => $file) {
                if (!isset($file['name'])) {
                    if (!isset($parsedFileArray[$name])) {
                        $parsedFileArray[$name]['name'] = [];
                        $parsedFileArray[$name]['type'] = [];
                        $parsedFileArray[$name]['tmp_name'] = [];
                        $parsedFileArray[$name]['error'] = [];
                        $parsedFileArray[$name]['size'] = [];
                    }
                    foreach ($file as $subfile) {
                        $parsedFileArray[$name]['name'][] = $subfile['name'];
                        $parsedFileArray[$name]['type'][] = $subfile['type'];
                        $parsedFileArray[$name]['tmp_name'][] = $subfile['tmp_name'];
                        $parsedFileArray[$name]['error'][] = $subfile['error'];
                        $parsedFileArray[$name]['size'][] = $subfile['size'];
                    }
                } else {
                    $parsedFileArray[$name] = $file;
                }
            }
        }

        return [
            'post'  => $this->post,
            'files' => isset($parsedFileArray) ? $parsedFileArray : $this->files
        ];
    }