FormFlashInterface
extends
JsonSerializable
in
Interface FormFlashInterface
Table of Contents
Methods
- __construct() : mixed
- addFile() : bool
- Add existing file to the form flash.
- addUploadedFile() : string
- Add uploaded file to the form flash.
- clearFiles() : void
- Clear form flash from all uploaded files.
- delete() : $this
- Delete this form flash.
- exists() : bool
- Check if this form flash exists.
- getCreatedTimestamp() : int
- Get creation timestamp for this form flash.
- getData() : array<string|int, mixed>|null
- Get raw form data.
- getFilesByField() : array<string|int, mixed>
- Get all files associated to a form field.
- getFilesByFields() : array<string|int, mixed>
- Get all files grouped by the associated form fields.
- getFormName() : string
- Get form name associated to this form instance.
- getId() : string
- Get unique form flash id if set.
- getSessionId() : string
- Get session Id associated to this form instance.
- getUniqueId() : string
- Get unique identifier associated to this form instance.
- getUpdatedTimestamp() : int
- Get last updated timestamp for this form flash.
- getUrl() : string
- Get URL associated to this form instance.
- getUserEmail() : string
- Get email from the user who was associated to this form instance.
- getUsername() : string
- Get username from the user who was associated to this form instance.
- jsonSerialize() : array<string|int, mixed>
- removeFile() : bool
- Remove any file from form flash.
- save() : $this
- Save this form flash.
- setData() : void
- Set raw form data.
Methods
__construct()
public
__construct(array<string|int, mixed> $config) : mixed
Parameters
- $config : array<string|int, mixed>
-
Available configuration keys: session_id, unique_id, form_name
addFile()
Add existing file to the form flash.
public
addFile(string $filename, string $field[, array<string|int, mixed>|null $crop = null ]) : bool
Parameters
- $filename : string
- $field : string
- $crop : array<string|int, mixed>|null = null
Return values
booladdUploadedFile()
Add uploaded file to the form flash.
public
addUploadedFile(UploadedFileInterface $upload[, string|null $field = null ][, array<string|int, mixed>|null $crop = null ]) : string
Parameters
- $upload : UploadedFileInterface
- $field : string|null = null
- $crop : array<string|int, mixed>|null = null
Return values
string —Return name of the file
clearFiles()
Clear form flash from all uploaded files.
public
clearFiles() : void
delete()
Delete this form flash.
public
delete() : $this
Return values
$thisexists()
Check if this form flash exists.
public
exists() : bool
Return values
boolgetCreatedTimestamp()
Get creation timestamp for this form flash.
public
getCreatedTimestamp() : int
Return values
intgetData()
Get raw form data.
public
getData() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullgetFilesByField()
Get all files associated to a form field.
public
getFilesByField(string $field) : array<string|int, mixed>
Parameters
- $field : string
Return values
array<string|int, mixed>getFilesByFields()
Get all files grouped by the associated form fields.
public
getFilesByFields([bool $includeOriginal = false ]) : array<string|int, mixed>
Parameters
- $includeOriginal : bool = false
Return values
array<string|int, mixed>getFormName()
Get form name associated to this form instance.
public
getFormName() : string
Return values
stringgetId()
Get unique form flash id if set.
public
getId() : string
Return values
stringgetSessionId()
Get session Id associated to this form instance.
public
getSessionId() : string
Return values
stringgetUniqueId()
Get unique identifier associated to this form instance.
public
getUniqueId() : string
Return values
stringgetUpdatedTimestamp()
Get last updated timestamp for this form flash.
public
getUpdatedTimestamp() : int
Return values
intgetUrl()
Get URL associated to this form instance.
public
getUrl() : string
Return values
stringgetUserEmail()
Get email from the user who was associated to this form instance.
public
getUserEmail() : string
Return values
stringgetUsername()
Get username from the user who was associated to this form instance.
public
getUsername() : string
Return values
stringjsonSerialize()
public
jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>removeFile()
Remove any file from form flash.
public
removeFile(string $name[, string|null $field = null ]) : bool
Parameters
- $name : string
- $field : string|null = null
Return values
boolsave()
Save this form flash.
public
save() : $this
Return values
$thissetData()
Set raw form data.
public
setData(array<string|int, mixed>|null $data) : void
Parameters
- $data : array<string|int, mixed>|null