Open Journal Systems  3.3.0
Symfony\Component\HttpFoundation\FileBag Class Reference
Inheritance diagram for Symfony\Component\HttpFoundation\FileBag:
Symfony\Component\HttpFoundation\ParameterBag

Public Member Functions

 __construct (array $parameters=[])
 
 __construct (array $parameters=array())
 
 add (array $files=[])
 
 add (array $files=array())
 
 replace (array $files=[])
 
 replace (array $files=array())
 
 set ($key, $value)
 
 set ($key, $value)
 
- Public Member Functions inherited from Symfony\Component\HttpFoundation\ParameterBag
 all ()
 
 all ()
 
 count ()
 
 count ()
 
 filter ($key, $default=null, $filter=FILTER_DEFAULT, $options=[])
 
 filter ($key, $default=null, $filter=FILTER_DEFAULT, $options=array())
 
 get ($key, $default=null)
 
 get ($key, $default=null)
 
 getAlnum ($key, $default='')
 
 getAlnum ($key, $default='')
 
 getAlpha ($key, $default='')
 
 getAlpha ($key, $default='')
 
 getBoolean ($key, $default=false)
 
 getBoolean ($key, $default=false)
 
 getDigits ($key, $default='')
 
 getDigits ($key, $default='')
 
 getInt ($key, $default=0)
 
 getInt ($key, $default=0)
 
 getIterator ()
 
 getIterator ()
 
 has ($key)
 
 has ($key)
 
 keys ()
 
 keys ()
 
 remove ($key)
 
 remove ($key)
 

Protected Member Functions

 convertFileInformation ($file)
 
 convertFileInformation ($file)
 
 fixPhpFilesArray ($data)
 
 fixPhpFilesArray ($data)
 

Additional Inherited Members

- Protected Attributes inherited from Symfony\Component\HttpFoundation\ParameterBag
 $parameters
 

Detailed Description

FileBag is a container for uploaded files.

Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com
Bulat Shakirzyanov malll.nosp@m.uhuc.nosp@m.t@gma.nosp@m.il.c.nosp@m.om

Definition at line 22 of file lib/vendor/symfony/http-foundation/FileBag.php.

Constructor & Destructor Documentation

◆ __construct() [1/2]

Symfony\Component\HttpFoundation\FileBag::__construct ( array  $parameters = array())

Constructor.

Parameters
array$parametersAn array of HTTP files

Reimplemented from Symfony\Component\HttpFoundation\ParameterBag.

Definition at line 31 of file lib/vendor/symfony/http-foundation/FileBag.php.

References Symfony\Component\HttpFoundation\ParameterBag\$parameters, and Symfony\Component\HttpFoundation\FileBag\replace().

◆ __construct() [2/2]

Symfony\Component\HttpFoundation\FileBag::__construct ( array  $parameters = [])
Parameters
array | UploadedFile[]$parametersAn array of HTTP files

Reimplemented from Symfony\Component\HttpFoundation\ParameterBag.

Definition at line 29 of file vendor/symfony/http-foundation/FileBag.php.

References Symfony\Component\HttpFoundation\ParameterBag\$parameters, and Symfony\Component\HttpFoundation\FileBag\replace().

Member Function Documentation

◆ add() [1/2]

Symfony\Component\HttpFoundation\FileBag::add ( array  $files = [])

{Adds parameters.

Parameters
array$parametersAn array of parameters
}

Reimplemented from Symfony\Component\HttpFoundation\ParameterBag.

Definition at line 58 of file vendor/symfony/http-foundation/FileBag.php.

◆ add() [2/2]

Symfony\Component\HttpFoundation\FileBag::add ( array  $files = array())

{Adds parameters.

Parameters
array$parametersAn array of parameters
}

Reimplemented from Symfony\Component\HttpFoundation\ParameterBag.

Definition at line 60 of file lib/vendor/symfony/http-foundation/FileBag.php.

Referenced by Symfony\Component\HttpFoundation\FileBag\replace().

◆ convertFileInformation() [1/2]

Symfony\Component\HttpFoundation\FileBag::convertFileInformation (   $file)
protected

Converts uploaded files to UploadedFile instances.

Parameters
array | UploadedFile$fileA (multi-dimensional) array of uploaded file information
Returns
UploadedFile[]|UploadedFile|null A (multi-dimensional) array of UploadedFile instances

Definition at line 72 of file vendor/symfony/http-foundation/FileBag.php.

References Symfony\Component\HttpFoundation\FileBag\fixPhpFilesArray().

◆ convertFileInformation() [2/2]

Symfony\Component\HttpFoundation\FileBag::convertFileInformation (   $file)
protected

Converts uploaded files to UploadedFile instances.

Parameters
array | UploadedFile$fileA (multi-dimensional) array of uploaded file information
Returns
UploadedFile|UploadedFile[] A (multi-dimensional) array of UploadedFile instances

Definition at line 74 of file lib/vendor/symfony/http-foundation/FileBag.php.

References Symfony\Component\HttpFoundation\FileBag\fixPhpFilesArray().

Referenced by Symfony\Component\HttpFoundation\FileBag\set().

◆ fixPhpFilesArray() [1/2]

Symfony\Component\HttpFoundation\FileBag::fixPhpFilesArray (   $data)
protected

Fixes a malformed PHP $_FILES array.

PHP has a bug that the format of the $_FILES array differs, depending on whether the uploaded file fields had normal field names or array-like field names ("normal" vs. "parent[child]").

This method fixes the array to look like the "normal" $_FILES array.

It's safe to pass an already converted array, in which case this method just returns the original array unmodified.

Parameters
array$data
Returns
array

Definition at line 115 of file lib/vendor/symfony/http-foundation/FileBag.php.

Referenced by Symfony\Component\HttpFoundation\FileBag\convertFileInformation(), and Symfony\Component\HttpFoundation\FileBag\fixPhpFilesArray().

◆ fixPhpFilesArray() [2/2]

Symfony\Component\HttpFoundation\FileBag::fixPhpFilesArray (   $data)
protected

Fixes a malformed PHP $_FILES array.

PHP has a bug that the format of the $_FILES array differs, depending on whether the uploaded file fields had normal field names or array-like field names ("normal" vs. "parent[child]").

This method fixes the array to look like the "normal" $_FILES array.

It's safe to pass an already converted array, in which case this method just returns the original array unmodified.

Parameters
array$data
Returns
array

Definition at line 116 of file vendor/symfony/http-foundation/FileBag.php.

References Symfony\Component\HttpFoundation\FileBag\fixPhpFilesArray().

◆ replace() [1/2]

Symfony\Component\HttpFoundation\FileBag::replace ( array  $files = [])

{Replaces the current parameters by a new set.

Parameters
array$parametersAn array of parameters
}

Reimplemented from Symfony\Component\HttpFoundation\ParameterBag.

Definition at line 37 of file vendor/symfony/http-foundation/FileBag.php.

References Symfony\Component\HttpFoundation\FileBag\add().

◆ replace() [2/2]

Symfony\Component\HttpFoundation\FileBag::replace ( array  $files = array())

{Replaces the current parameters by a new set.

Parameters
array$parametersAn array of parameters
}

Reimplemented from Symfony\Component\HttpFoundation\ParameterBag.

Definition at line 39 of file lib/vendor/symfony/http-foundation/FileBag.php.

References Symfony\Component\HttpFoundation\FileBag\add().

Referenced by Symfony\Component\HttpFoundation\FileBag\__construct().

◆ set() [1/2]

Symfony\Component\HttpFoundation\FileBag::set (   $key,
  $value 
)

{Sets a parameter by name.

Parameters
string$keyThe key
mixed$valueThe value
}

Reimplemented from Symfony\Component\HttpFoundation\ParameterBag.

Definition at line 46 of file vendor/symfony/http-foundation/FileBag.php.

References Symfony\Component\HttpFoundation\FileBag\convertFileInformation().

◆ set() [2/2]

Symfony\Component\HttpFoundation\FileBag::set (   $key,
  $value 
)

{Sets a parameter by name.

Parameters
string$keyThe key
mixed$valueThe value
}

Reimplemented from Symfony\Component\HttpFoundation\ParameterBag.

Definition at line 48 of file lib/vendor/symfony/http-foundation/FileBag.php.

References Symfony\Component\HttpFoundation\FileBag\convertFileInformation().


The documentation for this class was generated from the following file: