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

Breadcrumb

  1. Drupal Core 11.1.x

InputStreamUploadedFile.php

Namespace

Drupal\file\Upload

File

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.

API Navigation

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