Copied!
Cloneable Instantiable
  • Implements
    Psr\Http\Message\UploadedFileInterface
Methods
public __construct ( $streamOrFile , ? int $size , int $errorStatus , ? string $clientFilename = NULL , ? string $clientMediaType = NULL )
 
  • param StreamInterface | string | resource $streamOrFile
public getClientFilename () : ? string
public getClientMediaType () : ? string
public getError () : int
public getSize () : ? int
public getStream () : Psr\Http\Message\StreamInterface
public isMoved () : bool
public moveTo ( $targetPath ) : void
Constants
private GuzzleHttp\Psr7\UploadedFile ::ERRORS = [ 0 , 1 , 2 , 3 , 4 , 6 , 7 , 8 ]
Properties
private $clientFilename
 
  • var string | null
private $clientMediaType
 
  • var string | null
private $error
 
  • var int
private $file
 
  • var string | null
private $moved
 
  • var bool
private $size
 
  • var int | null
private $stream
 
  • var StreamInterface | null
Methods
private isOk () : bool
 

Return true if there is no upload error

private isStringNotEmpty ( $param ) : bool
private setError ( int $error ) : void
 
  • throws InvalidArgumentException
private setStreamOrFile ( $streamOrFile ) : void
 

Depending on the value set file or stream variable

  • param StreamInterface | string | resource $streamOrFile
  • throws InvalidArgumentException
private validateActive () : void
 
  • throws RuntimeException if is moved or not ok
© 2022 Bruce Wells
Search Namespaces \ Classes
Configuration