You are here

class UploadedFile in Zircon Profile 8

Same name in this branch
  1. 8 vendor/zendframework/zend-diactoros/src/UploadedFile.php \Zend\Diactoros\UploadedFile
  2. 8 vendor/symfony/http-foundation/File/UploadedFile.php \Symfony\Component\HttpFoundation\File\UploadedFile
  3. 8 vendor/symfony/psr-http-message-bridge/Tests/Fixtures/UploadedFile.php \Symfony\Bridge\PsrHttpMessage\Tests\Fixtures\UploadedFile
Same name and namespace in other branches
  1. 8.0 vendor/symfony/psr-http-message-bridge/Tests/Fixtures/UploadedFile.php \Symfony\Bridge\PsrHttpMessage\Tests\Fixtures\UploadedFile

@author Kévin Dunglas <dunglas@gmail.com>

Hierarchy

Expanded class hierarchy of UploadedFile

1 file declares its use of UploadedFile
HttpFoundationFactoryTest.php in vendor/symfony/psr-http-message-bridge/Tests/Factory/HttpFoundationFactoryTest.php

File

vendor/symfony/psr-http-message-bridge/Tests/Fixtures/UploadedFile.php, line 19

Namespace

Symfony\Bridge\PsrHttpMessage\Tests\Fixtures
View source
class UploadedFile implements UploadedFileInterface {
  private $filePath;
  private $size;
  private $error;
  private $clientFileName;
  private $clientMediaType;
  public function __construct($filePath, $size = null, $error = UPLOAD_ERR_OK, $clientFileName = null, $clientMediaType = null) {
    $this->filePath = $filePath;
    $this->size = $size;
    $this->error = $error;
    $this->clientFileName = $clientFileName;
    $this->clientMediaType = $clientMediaType;
  }
  public function getStream() {
    throw new \RuntimeException('No stream is available.');
  }
  public function moveTo($targetPath) {
    rename($this->filePath, $targetPath);
  }
  public function getSize() {
    return $this->size;
  }
  public function getError() {
    return $this->error;
  }
  public function getClientFilename() {
    return $this->clientFileName;
  }
  public function getClientMediaType() {
    return $this->clientMediaType;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
UploadedFile::$clientFileName private property
UploadedFile::$clientMediaType private property
UploadedFile::$error private property
UploadedFile::$filePath private property
UploadedFile::$size private property
UploadedFile::getClientFilename public function Retrieve the filename sent by the client. Overrides UploadedFileInterface::getClientFilename
UploadedFile::getClientMediaType public function Retrieve the media type sent by the client. Overrides UploadedFileInterface::getClientMediaType
UploadedFile::getError public function Retrieve the error associated with the uploaded file. Overrides UploadedFileInterface::getError
UploadedFile::getSize public function Retrieve the file size. Overrides UploadedFileInterface::getSize
UploadedFile::getStream public function Retrieve a stream representing the uploaded file. Overrides UploadedFileInterface::getStream
UploadedFile::moveTo public function Move the uploaded file to a new location. Overrides UploadedFileInterface::moveTo
UploadedFile::__construct public function