Documentation

AbstractSession
in package
implements SessionInterface, ArrayAccess, Countable, IteratorAggregate

AbstractYes

Abstract session class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

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

license

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

version
4.0.0

Table of Contents

Interfaces

SessionInterface
Session interface
ArrayAccess
Countable
IteratorAggregate

Methods

__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

__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

__unset()

Unset values[$name].

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

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

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

offsetSet()

ArrayAccess offsetSet

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

offsetUnset()

ArrayAccess offsetUnset

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

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>

        
On this page

Search results