public function build($force = false)
    {
        // Expensive: Try to get from last run ...
        if ((null === $parsedUploadedFiles = $this->getParsedUploadedFiles()) || (true === $force)) {
            $parsedUploadedFiles = [];

            // ... otherwise parse fresh
            foreach ($this->getUploadedFiles() as $argumentName => $file) {
                $parsedUploadedFiles[$argumentName] = $this->factoryFilesTree(
                    $file['name'],
                    $file['type'],
                    $file['tmp_name'],
                    $file['error'],
                    $file['size']
                );
            }

            $this->setParsedUploadedFiles($parsedUploadedFiles);
        }

        return $parsedUploadedFiles;
    }
public function build($force = false)
    {
        // Expensive: Try to get from last run ...
        if ((null === $parsedUploadedFiles = $this->getParsedUploadedFiles()) || (true === $force)) {
            $parsedUploadedFiles = [];

            // ... otherwise parse fresh
            foreach ($this->getUploadedFiles() as $argumentName => $file) {
                $parsedUploadedFiles[$argumentName] = $this->factoryFilesTree(
                    $file['name'],
                    $file['type'],
                    $file['tmp_name'],
                    $file['error'],
                    $file['size']
                );
            }

            $this->setParsedUploadedFiles($parsedUploadedFiles);
        }

        return $parsedUploadedFiles;
    }
public function build ( $ force = false ) { // Expensive: Try to get from last run ... if ( ( null === $ parsedUploadedFiles = $ this -> getParsedUploadedFiles ( ) ) || ( true === $ force ) ) { $ parsedUploadedFiles = [ ] ; // ... otherwise parse fresh foreach ( $ this -> getUploadedFiles ( ) as $ argumentName => $ file ) { $ parsedUploadedFiles [ $ argumentName ] = $ this -> factoryFilesTree ( $ file [ 'name' ] , $ file [ 'type' ] , $ file [ 'tmp_name' ] , $ file [ 'error' ] , $ file [ 'size' ] ) ; } $ this -> setParsedUploadedFiles ( $ parsedUploadedFiles ) ; } return $ parsedUploadedFiles ; }
Builds a PSR-7 compatible uploaded file structure and returns it.

@param bool $force TRUE to force build, otherwise FALSE to accept runtime cached result

@author Benjamin Carl <opensource@clickalicious.de>

@return array Uploaded files in new structure (PSR-7)
Builds a PSR - 7 compatible uploaded file structure and returns it .