Symfony2 API
Class

Symfony\Bundle\FrameworkBundle\Templating\Helper\SessionHelper

class SessionHelper extends Helper

SessionHelper provides read-only access to the session attributes.

Methods

setCharset(string $charset)

Sets the default charset.

from Helper
string getCharset()

Gets the default charset.

from Helper
__construct(Request $request)

Constructor.

mixed get(string $name, mixed $default = null)

Returns an attribute

getFlash($name, array $default = array())

getFlashes()

hasFlash($name)

string getName()

Returns the canonical name of this helper.

Details

in Helper at line 35
public setCharset(string $charset)

Sets the default charset.

Parameters

string $charset The charset

in Helper at line 47
public string getCharset()

Gets the default charset.

Return Value

string The default charset

at line 31
public __construct(Request $request)

Constructor.

Parameters

Request $request A Request instance

at line 44
public mixed get(string $name, mixed $default = null)

Returns an attribute

Parameters

string $name The attribute name
mixed $default The default value

Return Value

mixed

at line 49
public getFlash($name, array $default = array())

Parameters

$name
array $default

at line 54
public getFlashes()

at line 59
public hasFlash($name)

Parameters

$name

at line 69
public string getName()

Returns the canonical name of this helper.

Return Value

string The canonical name