Documentation

FlashBagInterface extends SessionBagInterface

FlashBagInterface.

Tags
author

Drak drak@zikula.org

Table of Contents

add()  : mixed
Adds a flash message for the given type.
all()  : array<string|int, mixed>
Gets and clears flashes from the stack.
clear()  : mixed
Clears out data from bag.
get()  : array<string|int, mixed>
Gets and clears flash from the stack.
getName()  : string
Gets this bag's name.
getStorageKey()  : string
Gets the storage key for this bag.
has()  : bool
Has flash messages for a given type?
initialize()  : mixed
Initializes the Bag.
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.

Methods

add()

Adds a flash message for the given type.

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

all()

Gets and clears flashes from the stack.

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

clear()

Clears out data from bag.

public clear() : mixed
Return values
mixed

Whatever data was contained

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()

Gets the storage key for this bag.

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()

Initializes the Bag.

public initialize(array<string|int, mixed> &$array) : mixed
Parameters
$array : array<string|int, mixed>
Return values
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>
Return values
mixed

setAll()

Sets all flash messages.

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

Search results