class File

@author Bernhard Schussek <bschussek@gmail.com>

@api

Hierarchy

  • class \Symfony\Component\Validator\Constraint
    • class \Symfony\Component\Validator\Constraints\File

Expanded class hierarchy of File

2 files declare their use of File
FileValidatorPathTest.php in drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Constraints/FileValidatorPathTest.php
FileValidatorTest.php in drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php
33 string references to 'File'
DirectoryTest::testFileCheckDirectoryHandling in drupal/core/modules/system/lib/Drupal/system/Tests/File/DirectoryTest.php
Test directory handling functions.
DirectoryTest::testFileCheckLocalDirectoryHandling in drupal/core/modules/system/lib/Drupal/system/Tests/File/DirectoryTest.php
Test local directory handling functions.
DirectoryTest::testFileCreateNewFilepath in drupal/core/modules/system/lib/Drupal/system/Tests/File/DirectoryTest.php
This will take a directory and path, and find a valid filepath that is not taken by another file.
DirectoryTest::testFileDestination in drupal/core/modules/system/lib/Drupal/system/Tests/File/DirectoryTest.php
This will test the filepath for a destination based on passed flags and whether or not the file exists.
field.field.field_image.yml in drupal/core/profiles/standard/config/field.field.field_image.yml
drupal/core/profiles/standard/config/field.field.field_image.yml

... See full list

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Constraints/File.php, line 23

Namespace

Symfony\Component\Validator\Constraints
View source
class File extends Constraint {
  public $maxSize = null;
  public $mimeTypes = array();
  public $notFoundMessage = 'The file could not be found.';
  public $notReadableMessage = 'The file is not readable.';
  public $maxSizeMessage = 'The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.';
  public $mimeTypesMessage = 'The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.';
  public $uploadIniSizeErrorMessage = 'The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.';
  public $uploadFormSizeErrorMessage = 'The file is too large.';
  public $uploadPartialErrorMessage = 'The file was only partially uploaded.';
  public $uploadNoFileErrorMessage = 'No file was uploaded.';
  public $uploadNoTmpDirErrorMessage = 'No temporary folder was configured in php.ini.';
  public $uploadCantWriteErrorMessage = 'Cannot write temporary file to disk.';
  public $uploadExtensionErrorMessage = 'A PHP extension caused the upload to fail.';
  public $uploadErrorMessage = 'The file could not be uploaded.';

}

Members

Namesort descending Modifiers Type Description Overrides
Constraint::$groups public property
Constraint::addImplicitGroupName public function Adds the given group if this constraint is in the Default group
Constraint::CLASS_CONSTRAINT constant Marks a constraint that can be put onto classes
Constraint::DEFAULT_GROUP constant The name of the group given to all constraints with no explicit group
Constraint::getDefaultOption public function Returns the name of the default option 12
Constraint::getRequiredOptions public function Returns the name of the required options 10
Constraint::getTargets public function Returns whether the constraint can be put onto classes, properties or both 7
Constraint::PROPERTY_CONSTRAINT constant Marks a constraint that can be put onto properties
Constraint::validatedBy public function Returns the name of the class that validates this constraint 2
Constraint::__construct public function Initializes the constraint with options. 10
Constraint::__set public function Unsupported operation.
File::$maxSize public property
File::$maxSizeMessage public property
File::$mimeTypes public property 1
File::$mimeTypesMessage public property 1
File::$notFoundMessage public property
File::$notReadableMessage public property
File::$uploadCantWriteErrorMessage public property
File::$uploadErrorMessage public property
File::$uploadExtensionErrorMessage public property
File::$uploadFormSizeErrorMessage public property
File::$uploadIniSizeErrorMessage public property
File::$uploadNoFileErrorMessage public property
File::$uploadNoTmpDirErrorMessage public property
File::$uploadPartialErrorMessage public property