Documentation

FormFlash
in package
implements FormFlashInterface

Class FormFlash

Table of Contents

Interfaces

FormFlashInterface
Interface FormFlashInterface

Properties

$createdTimestamp  : int
$data  : array<string|int, mixed>|null
$exists  : bool
$files  : array<string|int, mixed>
$folder  : string
$formName  : string
$id  : string
$sessionId  : string
$uniqueId  : string
$updatedTimestamp  : int
$uploadedFiles  : array<string|int, mixed>
$uploadObjects  : array<string|int, string>
$url  : string
$user  : array<string|int, mixed>|null

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.
getTmpDir()  : string
getUniqieId()  : string
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.
setUrl()  : $this
setUser()  : $this
setUserEmail()  : $this
setUserName()  : $this
addFileInternal()  : void
getTmpIndex()  : YamlFile|null
init()  : void
loadStoredForm()  : array<string|int, mixed>|null
Load raw flex flash data from the filesystem.
removeTmpDir()  : void
removeTmpFile()  : void

Properties

$createdTimestamp

protected int $createdTimestamp

$data

protected array<string|int, mixed>|null $data

$files

protected array<string|int, mixed> $files

$updatedTimestamp

protected int $updatedTimestamp

$uploadedFiles

protected array<string|int, mixed> $uploadedFiles

$uploadObjects

protected array<string|int, string> $uploadObjects

$user

protected array<string|int, mixed>|null $user

Methods

__construct()

public __construct(mixed $config) : mixed
Parameters
$config : mixed

Available configuration keys: session_id, unique_id, form_name

Tags
inheritDoc

addFile()

Add existing file to the form flash.

public addFile(string $filename, string $field[, array<string|int, mixed> $crop = null ]) : bool
Parameters
$filename : string
$field : string
$crop : array<string|int, mixed> = null
Tags
inheritDoc
Return values
bool

addUploadedFile()

Add uploaded file to the form flash.

public addUploadedFile(UploadedFileInterface $upload[, string $field = null ][, array<string|int, mixed> $crop = null ]) : string
Parameters
$upload : UploadedFileInterface
$field : string = null
$crop : array<string|int, mixed> = null
Tags
inheritDoc
Return values
string

Return name of the file

clearFiles()

Clear form flash from all uploaded files.

public clearFiles() : void
Tags
inheritDoc

delete()

Delete this form flash.

public delete() : $this
Tags
inheritDoc
Return values
$this

exists()

Check if this form flash exists.

public exists() : bool
Tags
inheritDoc
Return values
bool

getCreatedTimestamp()

Get creation timestamp for this form flash.

public getCreatedTimestamp() : int
Tags
inheritDoc
Return values
int

getData()

Get raw form data.

public getData() : array<string|int, mixed>|null
Tags
inheritDoc
Return values
array<string|int, mixed>|null

getFilesByField()

Get all files associated to a form field.

public getFilesByField(string $field) : array<string|int, mixed>
Parameters
$field : string
Tags
inheritDoc
Return values
array<string|int, mixed>

getFilesByFields()

Get all files grouped by the associated form fields.

public getFilesByFields([mixed $includeOriginal = false ]) : array<string|int, mixed>
Parameters
$includeOriginal : mixed = false
Tags
inheritDoc
Return values
array<string|int, mixed>

getFormName()

Get form name associated to this form instance.

public getFormName() : string
Tags
inheritDoc
Return values
string

getId()

Get unique form flash id if set.

public getId() : string
Tags
inheritDoc
Return values
string

getSessionId()

Get session Id associated to this form instance.

public getSessionId() : string
Tags
inheritDoc
Return values
string

getTmpDir()

public getTmpDir() : string
Return values
string

getUniqieId()

public getUniqieId() : string

Use '->getUniqueId()' method instead.

Return values
string

getUniqueId()

Get unique identifier associated to this form instance.

public getUniqueId() : string
Tags
inheritDoc
Return values
string

getUpdatedTimestamp()

Get last updated timestamp for this form flash.

public getUpdatedTimestamp() : int
Tags
inheritDoc
Return values
int

getUrl()

Get URL associated to this form instance.

public getUrl() : string
Tags
inheritDoc
Return values
string

getUserEmail()

Get email from the user who was associated to this form instance.

public getUserEmail() : string
Tags
inheritDoc
Return values
string

getUsername()

Get username from the user who was associated to this form instance.

public getUsername() : string
Tags
inheritDoc
Return values
string

jsonSerialize()

public jsonSerialize() : array<string|int, mixed>
Tags
inheritDoc
Return values
array<string|int, mixed>

removeFile()

Remove any file from form flash.

public removeFile(string $name[, string $field = null ]) : bool
Parameters
$name : string
$field : string = null
Tags
inheritDoc
Return values
bool

save()

Save this form flash.

public save([bool $force = false ]) : $this
Parameters
$force : bool = false
Tags
inheritDoc
Return values
$this

setData()

Set raw form data.

public setData(array<string|int, mixed>|null $data) : void
Parameters
$data : array<string|int, mixed>|null
Tags
inheritDoc

setUrl()

public setUrl(string $url) : $this
Parameters
$url : string
Return values
$this

setUserEmail()

public setUserEmail([string|null $email = null ]) : $this
Parameters
$email : string|null = null
Return values
$this

setUserName()

public setUserName([string|null $username = null ]) : $this
Parameters
$username : string|null = null
Return values
$this

addFileInternal()

protected addFileInternal(string|null $field, string $name, array<string|int, mixed> $data[, array<string|int, mixed>|null $crop = null ]) : void
Parameters
$field : string|null
$name : string
$data : array<string|int, mixed>
$crop : array<string|int, mixed>|null = null

getTmpIndex()

protected getTmpIndex() : YamlFile|null
Return values
YamlFile|null

init()

protected init(array<string|int, mixed>|null $data, array<string|int, mixed> $config) : void
Parameters
$data : array<string|int, mixed>|null
$config : array<string|int, mixed>

loadStoredForm()

Load raw flex flash data from the filesystem.

protected loadStoredForm() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

removeTmpDir()

protected removeTmpDir() : void

removeTmpFile()

protected removeTmpFile(string $name) : void
Parameters
$name : string

        
On this page

Search results