PHP Class Phly\Http\UploadedFile

Inheritance: implements Psr\Http\Message\UploadedFileInterface
Datei anzeigen Open project: phly/http Class Usage Examples

Public Methods

Method Description
__construct ( $streamOrFile, $size, $errorStatus, $clientFilename = null, $clientMediaType = null )
getClientFilename ( ) : string | null
getClientMediaType ( )
getError ( ) : integer
getSize ( ) : integer | null
getStream ( )
moveTo ( string $targetPath )

Private Methods

Method Description
writeFile ( string $path ) Write internal stream to given path

Method Details

__construct() public method

public __construct ( $streamOrFile, $size, $errorStatus, $clientFilename = null, $clientMediaType = null )

getClientFilename() public method

public getClientFilename ( ) : string | null
return string | null The filename sent by the client or null if none was provided.

getClientMediaType() public method

public getClientMediaType ( )

getError() public method

See also: http://php.net/manual/en/features.file-upload.errors.php
public getError ( ) : integer
return integer One of PHP's UPLOAD_ERR_XXX constants.

getSize() public method

public getSize ( ) : integer | null
return integer | null The file size in bytes or null if unknown.

getStream() public method

public getStream ( )

moveTo() public method

See also: http://php.net/is_uploaded_file
See also: http://php.net/move_uploaded_file
public moveTo ( string $targetPath )
$targetPath string Path to which to move the uploaded file.