Documentation

AbstractSession
in package
implements SessionInterface, ArrayAccess, Countable, IteratorAggregate

Abstract session class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2023 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
3.3.0

Interfaces, Classes, Traits and Enums

SessionInterface
Session interface
ArrayAccess
Countable
IteratorAggregate

Table of Contents

__get()  : mixed
Magic get method to return the value of values[$name].
__isset()  : bool
Return the isset value of values[$name].
__set()  : void
Magic set method to set values[$name].
__unset()  : void
Unset values[$name].
count()  : int
Method to get the count of data in the session
getIterator()  : ArrayIterator
Method to iterate over the session
kill()  : void
Destroy the session
offsetExists()  : bool
ArrayAccess offsetExists
offsetGet()  : mixed
ArrayAccess offsetGet
offsetSet()  : void
ArrayAccess offsetSet
offsetUnset()  : void
ArrayAccess offsetUnset
setRequestValue()  : AbstractSession
Set a request-based value
setTimedValue()  : AbstractSession
Set a time-based value
toArray()  : array<string|int, mixed>
Get the session values as an array

Methods

__get()

Magic get method to return the value of values[$name].

public abstract __get(string $name) : mixed
Parameters
$name : string
Return values
mixed

__isset()

Return the isset value of values[$name].

public abstract __isset(string $name) : bool
Parameters
$name : string
Return values
bool

__set()

Magic set method to set values[$name].

public abstract __set(string $name, mixed $value) : void
Parameters
$name : string
$value : mixed
Return values
void

__unset()

Unset values[$name].

public abstract __unset(string $name) : void
Parameters
$name : string
Return values
void

count()

Method to get the count of data in the session

public count() : int
Return values
int

getIterator()

Method to iterate over the session

public getIterator() : ArrayIterator
Return values
ArrayIterator

kill()

Destroy the session

public abstract kill() : void
Return values
void

offsetExists()

ArrayAccess offsetExists

public offsetExists(mixed $offset) : bool
Parameters
$offset : mixed
Return values
bool

offsetGet()

ArrayAccess offsetGet

public offsetGet(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

offsetSet()

ArrayAccess offsetSet

public offsetSet(mixed $offset, mixed $value) : void
Parameters
$offset : mixed
$value : mixed
Return values
void

offsetUnset()

ArrayAccess offsetUnset

public offsetUnset(mixed $offset) : void
Parameters
$offset : mixed
Return values
void

setRequestValue()

Set a request-based value

public abstract setRequestValue(string $key, mixed $value[, int $hops = 1 ]) : AbstractSession
Parameters
$key : string
$value : mixed
$hops : int = 1
Return values
AbstractSession

setTimedValue()

Set a time-based value

public abstract setTimedValue(string $key, mixed $value[, int $expire = 300 ]) : AbstractSession
Parameters
$key : string
$value : mixed
$expire : int = 300
Return values
AbstractSession

toArray()

Get the session values as an array

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

Search results