private function UploadedFile::setStreamOrFile in Lockr 7.3
Depending on the value set file or stream variable
Parameters
mixed $streamOrFile:
Throws
InvalidArgumentException
1 call to UploadedFile::setStreamOrFile()
- UploadedFile::__construct in vendor/
guzzlehttp/ psr7/ src/ UploadedFile.php
File
- vendor/
guzzlehttp/ psr7/ src/ UploadedFile.php, line 90
Class
Namespace
GuzzleHttp\Psr7Code
private function setStreamOrFile($streamOrFile) {
if (is_string($streamOrFile)) {
$this->file = $streamOrFile;
}
elseif (is_resource($streamOrFile)) {
$this->stream = new Stream($streamOrFile);
}
elseif ($streamOrFile instanceof StreamInterface) {
$this->stream = $streamOrFile;
}
else {
throw new InvalidArgumentException('Invalid stream or file provided for UploadedFile');
}
}