-
Notifications
You must be signed in to change notification settings - Fork 1
UploadedFile: __construct Example
Terry L edited this page Jun 20, 2020
·
2 revisions
Shieldon\Psr7\UploadedFile
-
param
string|StreamInterfacesource*The full path of a file or stream. -
param
string|nullname= nullThe file name. -
param
string|nulltype= nullThe file media type. -
param
int|nullsize= nullThe file size in bytes. -
param
interror= 0The status code of the upload. -
param
string|nullsapi= nullOnly assign for unit testing purpose.
Example:
$uploadedFile = new \Shieldon\Psr7\UploadedFile(
'/tmp/php200A.tmp', // source
'example1.jpg', // name
'image/jpeg', // type
100000, // size
0 // error
);composer require shieldon/psr-httpShieldon PSR HTTP implementation written by Terry L. from Taiwan.
