src/ministruts/Request.php
public function getFiles() {
        static $files;
        if (!isset($files)) {
            $normalizeLevel = function(array $file) use (&$normalizeLevel) {
                if (isset($file['name']) && is_array($file['name'])) {
                    $properties = \array_keys($file);
                    $normalized = [];
                    foreach (\array_keys($file['name']) as $name) {
                        foreach ($properties as $property) {
                            $normalized[$name][$property] = $file[$property][$name];
                        }
                        $normalized[$name] = $normalizeLevel($normalized[$name]);
                    }
                    $file = $normalized;
                }
                return $file;
            };
            $files = [];
            if (isset($_FILES)) {
                foreach ($_FILES as $key => $file) {
                    $files[$key] = $normalizeLevel($file);
                }
            }
        }
        return $files;
    }
public function getFiles() {
        static $files;
        if (!isset($files)) {
            $normalizeLevel = function(array $file) use (&$normalizeLevel) {
                if (isset($file['name']) && is_array($file['name'])) {
                    $properties = \array_keys($file);
                    $normalized = [];
                    foreach (\array_keys($file['name']) as $name) {
                        foreach ($properties as $property) {
                            $normalized[$name][$property] = $file[$property][$name];
                        }
                        $normalized[$name] = $normalizeLevel($normalized[$name]);
                    }
                    $file = $normalized;
                }
                return $file;
            };
            $files = [];
            if (isset($_FILES)) {
                foreach ($_FILES as $key => $file) {
                    $files[$key] = $normalizeLevel($file);
                }
            }
        }
        return $files;
    }
public function getFiles ( ) { static $ files ; if ( ! isset ( $ files ) ) { $ normalizeLevel = function ( array $ file ) use ( & $ normalizeLevel ) { if ( isset ( $ file [ 'name' ] ) && is_array ( $ file [ 'name' ] ) ) { $ properties = \ array_keys ( $ file ) ; $ normalized = [ ] ; foreach ( \ array_keys ( $ file [ 'name' ] ) as $ name ) { foreach ( $ properties as $ property ) { $ normalized [ $ name ] [ $ property ] = $ file [ $ property ] [ $ name ] ; } $ normalized [ $ name ] = $ normalizeLevel ( $ normalized [ $ name ] ) ; } $ file = $ normalized ; } return $ file ; } ; $ files = [ ] ; if ( isset ( $ _FILES ) ) { foreach ( $ _FILES as $ key => $ file ) { $ files [ $ key ] = $ normalizeLevel ( $ file ) ; } } } return $ files ; }
Return an object-oriented representation of the uploaded files. The broken PHP array structure of uploaded files is
converted to regular file arrays.

@TODO: convert file data to {@link UploadedFile} instances

@return array - associative array of files
Return an object - oriented representation of the uploaded files . The broken PHP array structure of uploaded files is converted to regular file arrays .