PHP Class Zend\Diactoros\UploadedFile

Inheritance: implements Psr\Http\Message\UploadedFileInterface
Afficher le fichier Open project: zendframework/zend-diactoros

Méthodes publiques

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

Private Methods

Méthode Description
writeFile ( string $path ) Write internal stream to given path

Method Details

__construct() public méthode

public __construct ( string | resource $streamOrFile, integer $size, integer $errorStatus, string | null $clientFilename = null, string | null $clientMediaType = null )
$streamOrFile string | resource
$size integer
$errorStatus integer
$clientFilename string | null
$clientMediaType string | null

getClientFilename() public méthode

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

getClientMediaType() public méthode

public getClientMediaType ( )

getError() public méthode

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

getSize() public méthode

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

getStream() public méthode

public getStream ( )

moveTo() public méthode

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.