class InputStreamUploadedFile

Same name in other branches
  1. 10 core/modules/file/src/Upload/InputStreamUploadedFile.php \Drupal\file\Upload\InputStreamUploadedFile

An uploaded file from an input stream.

Hierarchy

Expanded class hierarchy of InputStreamUploadedFile

2 files declare their use of InputStreamUploadedFile
FileUpload.php in core/modules/jsonapi/src/Controller/FileUpload.php
FileUploadResource.php in core/modules/file/src/Plugin/rest/resource/FileUploadResource.php

File

core/modules/file/src/Upload/InputStreamUploadedFile.php, line 12

Namespace

Drupal\file\Upload
View source
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();
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
InputStreamUploadedFile::getClientOriginalName public function Returns the original file name. Overrides UploadedFileInterface::getClientOriginalName
InputStreamUploadedFile::getFilename public function Gets the filename. Overrides UploadedFileInterface::getFilename
InputStreamUploadedFile::getPathname public function Gets the path to the file. Overrides UploadedFileInterface::getPathname
InputStreamUploadedFile::getRealPath public function Gets the absolute path to the file. Overrides UploadedFileInterface::getRealPath
InputStreamUploadedFile::getSize public function Gets file size. Overrides UploadedFileInterface::getSize
InputStreamUploadedFile::validate public function Validates the uploaded file information. Overrides UploadedFileInterface::validate
InputStreamUploadedFile::__construct public function Creates a new InputStreamUploadedFile.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.