InputStreamUploadedFile.php
Same filename in other branches
Namespace
Drupal\file\UploadFile
-
core/
modules/ file/ src/ Upload/ InputStreamUploadedFile.php
View source
<?php
namespace Drupal\file\Upload;
use Symfony\Component\Validator\ConstraintViolationList;
use Symfony\Component\Validator\ConstraintViolationListInterface;
use Symfony\Component\Validator\Validator\ValidatorInterface;
/**
* An uploaded file from an input stream.
*/
final class InputStreamUploadedFile implements UploadedFileInterface {
/**
* Creates a new InputStreamUploadedFile.
*/
public function __construct(string $clientOriginalName, string $filename, string $realPath, int|false $size) {
}
/**
* {@inheritdoc}
*/
public function getClientOriginalName() : string {
return $this->clientOriginalName;
}
/**
* {@inheritdoc}
*/
public function getSize() : int {
return $this->size;
}
/**
* {@inheritdoc}
*/
public function getRealPath() : string|false {
return $this->realPath;
}
/**
* {@inheritdoc}
*/
public function getFilename() : string {
return $this->filename;
}
/**
* {@inheritdoc}
*/
public function getPathname() : string {
throw new \BadMethodCallException(__METHOD__ . ' not implemented');
}
/**
* {@inheritdoc}
*/
public function validate(ValidatorInterface $validator, array $options = []) : ConstraintViolationListInterface {
return new ConstraintViolationList();
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
InputStreamUploadedFile | An uploaded file from an input stream. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.