class FileFormField extends FormField
FileFormField represents a file form field (an HTML file input tag).
protected DOMElement | $node | from FormField | |
protected string | $name | from FormField | |
protected string | $value | from FormField | |
protected DOMDocument | $document | from FormField | |
protected DOMXPath | $xpath | from FormField | |
protected bool | $disabled | from FormField |
__construct(DOMElement $node) | from FormField | |
DOMElement|null | getLabel() Returns the label tag associated to the field or null if none. | from FormField |
string | getName() Returns the name of the field. | from FormField |
string|array | getValue() Gets the value of the field. | from FormField |
setValue(string $value) Sets the value of the field. | ||
bool | hasValue() Returns true if the field should be included in the submitted values. | from FormField |
bool | isDisabled() Check if the current field is disabled. | from FormField |
initialize() Initializes the form field. | ||
setErrorCode(int $error) Sets the PHP error code associated with the field. | ||
upload(string $value) Sets the value of the field. | ||
setFilePath(string $path) Sets path to the file as string for simulating HTTP request. |
DOMElement | $node | The node associated with this field |
Returns the label tag associated to the field or null if none.
DOMElement|null |
Returns the name of the field.
string | The name of the field |
Gets the value of the field.
string|array | The value of the field |
Sets the value of the field.
string | $value | The value of the field |
Returns true if the field should be included in the submitted values.
bool | true if the field should be included in the submitted values, false otherwise |
Check if the current field is disabled.
bool |
Initializes the form field.
LogicException | When node type is incorrect |
Sets the PHP error code associated with the field.
int | $error | The error code (one of UPLOAD_ERR_INI_SIZE, UPLOAD_ERR_FORM_SIZE, UPLOAD_ERR_PARTIAL, UPLOAD_ERR_NO_FILE, UPLOAD_ERR_NO_TMP_DIR, UPLOAD_ERR_CANT_WRITE, or UPLOAD_ERR_EXTENSION) |
InvalidArgumentException | When error code doesn't exist |
Sets the value of the field.
string | $value | The value of the field |
Sets path to the file as string for simulating HTTP request.
string | $path | The path to the file |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/DomCrawler/Field/FileFormField.html