Documentation

AutoExpireFlashBag
in package
implements FlashBagInterface

AutoExpireFlashBag flash message container.

Tags
author

Drak drak@zikula.org

Table of Contents

Interfaces

FlashBagInterface
FlashBagInterface.

Properties

$flashes  : array<string|int, mixed>
$name  : string
$storageKey  : string

Methods

__construct()  : mixed
add()  : mixed
Adds a flash message for the given type.
all()  : array<string|int, mixed>
Gets and clears flashes from the stack.
clear()  : mixed
{@inheritdoc}
get()  : array<string|int, mixed>
Gets and clears flash from the stack.
getName()  : string
{@inheritdoc}
getStorageKey()  : string
{@inheritdoc}
has()  : bool
Has flash messages for a given type?
initialize()  : mixed
{@inheritdoc}
keys()  : array<string|int, mixed>
Returns a list of all defined types.
peek()  : array<string|int, mixed>
Gets flash messages for a given type.
peekAll()  : array<string|int, mixed>
Gets all flash messages.
set()  : mixed
Registers one or more messages for a given type.
setAll()  : mixed
Sets all flash messages.
setName()  : mixed

Properties

$flashes

private array<string|int, mixed> $flashes = ['display' => [], 'new' => []]

Methods

__construct()

public __construct([string $storageKey = '_symfony_flashes' ]) : mixed
Parameters
$storageKey : string = '_symfony_flashes'

The key used to store flashes in the session

add()

Adds a flash message for the given type.

public add(string $type, mixed $message) : mixed
Parameters
$type : string
$message : mixed

all()

Gets and clears flashes from the stack.

public all() : array<string|int, mixed>
Return values
array<string|int, mixed>

get()

Gets and clears flash from the stack.

public get(string $type[, array<string|int, mixed> $default = [] ]) : array<string|int, mixed>
Parameters
$type : string
$default : array<string|int, mixed> = []

Default value if $type does not exist

Return values
array<string|int, mixed>

getStorageKey()

{@inheritdoc}

public getStorageKey() : string
Return values
string

has()

Has flash messages for a given type?

public has(string $type) : bool
Parameters
$type : string
Return values
bool

initialize()

{@inheritdoc}

public initialize(array<string|int, mixed> &$flashes) : mixed
Parameters
$flashes : array<string|int, mixed>

keys()

Returns a list of all defined types.

public keys() : array<string|int, mixed>
Return values
array<string|int, mixed>

peek()

Gets flash messages for a given type.

public peek(string $type[, array<string|int, mixed> $default = [] ]) : array<string|int, mixed>
Parameters
$type : string

Message category type

$default : array<string|int, mixed> = []

Default value if $type does not exist

Return values
array<string|int, mixed>

peekAll()

Gets all flash messages.

public peekAll() : array<string|int, mixed>
Return values
array<string|int, mixed>

set()

Registers one or more messages for a given type.

public set(string $type, string|array<string|int, mixed> $messages) : mixed
Parameters
$type : string
$messages : string|array<string|int, mixed>

setAll()

Sets all flash messages.

public setAll(array<string|int, mixed> $messages) : mixed
Parameters
$messages : array<string|int, mixed>

        
On this page

Search results