Skip to main content Link Menu Expand (external link) Document Search Copy Copied

This is automatic generated document for things in Swow\Psr7\Message\UploadedFile class

Class UploadedFile

PSR-7 UploadedFile implementation (https://github.com/Nyholm/psr7/blob/master/src/UploadedFile.php)

Constants

protected ERRORS = {"0":true,"1":true,"2":true,"3":true,"4":true,"6":true,"7":true,"8":true}

Properties

protected $clientFilename protected $clientMediaType protected $error protected $file protected $moved protected $size protected $stream

Methods

Method __construct

public function __construct ( (string | resource | StreamInterface) $streamOrFile , ?int $size , int $error , ?string $clientFilename , ?string $clientMediaType )

Method __destruct

public function __destruct ( )

Method getClientFilename

public function getClientFilename ( ) : ?string

Method getClientMediaType

public function getClientMediaType ( ) : ?string

Method getError

public function getError ( ) : int

Method getExtension

public function getExtension ( ) : string

Method getSize

public function getSize ( ) : ?int

Method getStream

public function getStream ( ) : StreamInterface

Method isMoved

public function isMoved ( ) : bool

Method moveTo

public function moveTo ( mixed $targetPath ) : void

Method toArray

public function toArray ( ) : array{name: (string | null), type: (string | null), tmp_file: (string | null), error: int, size: (int | false)}

Method validateActive

protected function validateActive ( ) : void

Throws RuntimeException if is moved or not ok


Copyright 2022 the Swow contributors