Codesleeve\Stapler\Factories\File::createFromArray PHP Method

createFromArray() protected static method

Build a Codesleeve\Stapler\File\File object from the raw php $_FILES array date. We assume here that the $_FILES array has been formated using the Stapler::arrangeFiles utility method.
protected static createFromArray ( array $file, boolean $testing ) : Codesleeve\Stapler\File\File
$file array
$testing boolean
return Codesleeve\Stapler\File\File
    protected static function createFromArray(array $file, $testing)
    {
        $file = new SymfonyUploadedFile($file['tmp_name'], $file['name'], $file['type'], $file['size'], $file['error'], $testing);
        return static::createFromObject($file);
    }