class Store implements SessionInterface (View source)

Methods

void
__construct( string $name, SessionHandlerInterface $handler, string|null $id = null)

Create a new session instance.

start()

{@inheritdoc}

getId()

{@inheritdoc}

setId($id)

{@inheritdoc}

bool
isValidId( string $id)

Determine if this is a valid session ID.

getName()

{@inheritdoc}

setName($name)

{@inheritdoc}

invalidate($lifetime = null)

{@inheritdoc}

migrate($destroy = false, $lifetime = null)

{@inheritdoc}

bool
regenerate( bool $destroy = false)

Generate a new session identifier.

save()

{@inheritdoc}

void
ageFlashData()

Age the flash data for the session.

has($name)

{@inheritdoc}

get($name, $default = null)

{@inheritdoc}

mixed
pull( string $key, string $default = null)

Get the value of a given key and then forget it.

bool
hasOldInput( string $key = null)

Determine if the session contains old input.

mixed
getOldInput( string $key = null, mixed $default = null)

Get the requested item from the flashed input array.

set($name, $value)

{@inheritdoc}

void
put( string|array $key, mixed $value = null)

Put a key / value pair or array of key / value pairs in the session.

void
push( string $key, mixed $value)

Push a value onto a session array.

void
flash( string $key, mixed $value)

Flash a key / value pair to the session.

void
now( string $key, mixed $value)

Flash a key / value pair to the session for immediate use.

void
flashInput( array $value)

Flash an input array to the session.

void
reflash()

Reflash all of the session flash data.

void
keep( array|mixed $keys = null)

Reflash a subset of the current flash data.

all()

{@inheritdoc}

replace( array $attributes)

{@inheritdoc}

remove($name)

{@inheritdoc}

void
forget( string|array $keys)

Remove one or many items from the session.

clear()

{@inheritdoc}

void
flush()

Remove all of the items from the session.

isStarted()

{@inheritdoc}

registerBag( SessionBagInterface $bag)

{@inheritdoc}

getBag($name)

{@inheritdoc}

getMetadataBag()

{@inheritdoc}

array
getBagData( string $name)

Get the raw bag data array for a given bag.

string
token()

Get the CSRF token value.

string
getToken()

Get the CSRF token value.

void
regenerateToken()

Regenerate the CSRF token value.

string|null
previousUrl()

Get the previous URL from the session.

void
setPreviousUrl( string $url)

Set the "previous" URL in the session.

void
setExists( bool $value)

Set the existence of the session on the handler if applicable.

getHandler()

Get the underlying session handler implementation.

bool
handlerNeedsRequest()

Determine if the session handler needs a request.

void
setRequestOnHandler( Request $request)

Set the request on the handler instance.

Details

at line line 79
void __construct( string $name, SessionHandlerInterface $handler, string|null $id = null)

Create a new session instance.

Parameters

string $name
SessionHandlerInterface $handler
string|null $id

Return Value

void

at line line 90
start()

{@inheritdoc}

at line line 162
getId()

{@inheritdoc}

at line line 170
setId($id)

{@inheritdoc}

Parameters

$id

at line line 185
bool isValidId( string $id)

Determine if this is a valid session ID.

Parameters

string $id

Return Value

bool

at line line 203
getName()

{@inheritdoc}

at line line 211
setName($name)

{@inheritdoc}

Parameters

$name

at line line 219
invalidate($lifetime = null)

{@inheritdoc}

Parameters

$lifetime

at line line 229
migrate($destroy = false, $lifetime = null)

{@inheritdoc}

Parameters

$destroy
$lifetime

at line line 248
bool regenerate( bool $destroy = false)

Generate a new session identifier.

Parameters

bool $destroy

Return Value

bool

at line line 256
save()

{@inheritdoc}

at line line 299
void ageFlashData()

Age the flash data for the session.

Return Value

void

at line line 311
has($name)

{@inheritdoc}

Parameters

$name

at line line 327
get($name, $default = null)

{@inheritdoc}

Parameters

$name
$default

at line line 339
mixed pull( string $key, string $default = null)

Get the value of a given key and then forget it.

Parameters

string $key
string $default

Return Value

mixed

at line line 350
bool hasOldInput( string $key = null)

Determine if the session contains old input.

Parameters

string $key

Return Value

bool

at line line 364
mixed getOldInput( string $key = null, mixed $default = null)

Get the requested item from the flashed input array.

Parameters

string $key
mixed $default

Return Value

mixed

at line line 377
set($name, $value)

{@inheritdoc}

Parameters

$name
$value

at line line 389
void put( string|array $key, mixed $value = null)

Put a key / value pair or array of key / value pairs in the session.

Parameters

string|array $key
mixed $value

Return Value

void

at line line 407
void push( string $key, mixed $value)

Push a value onto a session array.

Parameters

string $key
mixed $value

Return Value

void

at line line 423
void flash( string $key, mixed $value)

Flash a key / value pair to the session.

Parameters

string $key
mixed $value

Return Value

void

at line line 440
void now( string $key, mixed $value)

Flash a key / value pair to the session for immediate use.

Parameters

string $key
mixed $value

Return Value

void

at line line 453
void flashInput( array $value)

Flash an input array to the session.

Parameters

array $value

Return Value

void

at line line 463
void reflash()

Reflash all of the session flash data.

Return Value

void

at line line 476
void keep( array|mixed $keys = null)

Reflash a subset of the current flash data.

Parameters

array|mixed $keys

Return Value

void

at line line 512
all()

{@inheritdoc}

at line line 520
replace( array $attributes)

{@inheritdoc}

Parameters

array $attributes

at line line 528
remove($name)

{@inheritdoc}

Parameters

$name

at line line 539
void forget( string|array $keys)

Remove one or many items from the session.

Parameters

string|array $keys

Return Value

void

at line line 547
clear()

{@inheritdoc}

at line line 561
void flush()

Remove all of the items from the session.

Return Value

void

at line line 569
isStarted()

{@inheritdoc}

at line line 577
registerBag( SessionBagInterface $bag)

{@inheritdoc}

Parameters

SessionBagInterface $bag

at line line 585
getBag($name)

{@inheritdoc}

Parameters

$name

at line line 595
getMetadataBag()

{@inheritdoc}

at line line 606
array getBagData( string $name)

Get the raw bag data array for a given bag.

Parameters

string $name

Return Value

array

at line line 616
string token()

Get the CSRF token value.

Return Value

string

at line line 626
string getToken()

Get the CSRF token value.

Return Value

string

at line line 636
void regenerateToken()

Regenerate the CSRF token value.

Return Value

void

at line line 646
string|null previousUrl()

Get the previous URL from the session.

Return Value

string|null

at line line 657
void setPreviousUrl( string $url)

Set the "previous" URL in the session.

Parameters

string $url

Return Value

void

at line line 668
void setExists( bool $value)

Set the existence of the session on the handler if applicable.

Parameters

bool $value

Return Value

void

at line line 680
SessionHandlerInterface getHandler()

Get the underlying session handler implementation.

at line line 690
bool handlerNeedsRequest()

Determine if the session handler needs a request.

Return Value

bool

at line line 701
void setRequestOnHandler( Request $request)

Set the request on the handler instance.

Parameters

Request $request

Return Value

void