protected function parseData(array $data)
{
$this->files = [];
foreach ($data as $key => $value) {
// If this value is an instance of the HttpFoundation File class we will
// remove it from the data array and add it to the files array, which
// we use to conveniently separate out these files from other data.
if (in_array($value, $_FILES, true)) {
$this->files[$key] = $value;
unset($data[$key]);
}
}
return $data;
}