Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. InputStreamUploadedFile.php

class InputStreamUploadedFile

An uploaded file from an input stream.

Hierarchy

  • class \Drupal\file\Upload\InputStreamUploadedFile implements \Drupal\file\Upload\UploadedFileInterface

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.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal