PHP Class ManaPHP\Http\Session\Bag

Inheritance: extends ManaPHP\Component, implements ManaPHP\Http\Session\BagInterface
Datei anzeigen Open project: manaphp/manaphp

Protected Properties

Property Type Description
$_name string

Public Methods

Method Description
__construct ( string $name ) \ManaPHP\Session\Bag constructor
destroy ( ) Destroys the session bag
dump ( ) : array
get ( string $property = null, string $defaultValue = null ) : mixed Obtains a value from the session bag optionally setting a default value
has ( string $property ) : boolean Check whether a property is defined in the internal bag
remove ( string $property ) : void Removes a property from the internal bag
set ( string $property, mixed $value ) Sets a value in the session bag

Method Details

__construct() public method

\ManaPHP\Session\Bag constructor
public __construct ( string $name )
$name string

destroy() public method

$user->destroy();
public destroy ( )

dump() public method

public dump ( ) : array
return array

get() public method

echo $user->get('name', 'Kimbra');
public get ( string $property = null, string $defaultValue = null ) : mixed
$property string
$defaultValue string
return mixed

has() public method

var_dump($user->has('name'));
public has ( string $property ) : boolean
$property string
return boolean

remove() public method

$user->remove('name');
public remove ( string $property ) : void
$property string
return void

set() public method

$user->set('name', 'Kimbra');
public set ( string $property, mixed $value )
$property string
$value mixed

Property Details

$_name protected_oe property

protected string $_name
return string