WiseLoop PHP REST Services 3.3.1
RESTful web service API framework for PHP
wlSession Class Reference

Public Member Functions

 __construct ($name= 'wl')
 set ($key, $data)
 get ($key, $fieldName=null)
 clear ($key)

Detailed Description

WiseLoop Session class definition
This class is responsible for handling server session data. The session is basically a collection of key-value pairs gathered together under a common session name.

Author:
WiseLoop

Constructor & Destructor Documentation

__construct ( name = 'wl')

Constructor.
Creates a wlSession object.

Parameters:
string$namethe session name

Member Function Documentation

clear ( key)

Clears the session value for the specified key.

Parameters:
string$keythe key value
get ( key,
fieldName = null 
)

Gets a session value.

Parameters:
string$keythe key name
string | null$fieldNameif the value is an array, the fieldName specify the field (key) of that array and the corresponding value will be retrieved instead of the whole array
Returns:
mixed|null
set ( key,
data 
)

Sets a session value.

Parameters:
string$keythe key name
mixed$datathe value
Returns:
mixed the value data if the set was successful or null if not
 All Data Structures Functions Variables