boolean decode(
String
$data
)
|
|
Decodes the session data
Usage: $rc = Session::decode($html);
Parameters:
|
String |
$data: |
The data to decode |
API Tags:
| Return: | TRUE on success, FALSE on failure |
| Static: | |
Returns a string with the encoded session data
Usage: $html = Session::encode();
API Tags:
| Return: | The encoded data |
| Static: | |
int getCacheExpire(
[String
$time = '']
)
|
|
Returns or sets the cache expire time
Usage: $t = Session::getCacheExpire($time); NOTE: Must be called before Session::start()
Parameters:
|
String |
$time: |
The new expire time |
API Tags:
| Return: | The expiration time |
| Static: | |
String getCacheLimiter(
[String
$name = '']
)
|
|
Returns the name of the current cache limiter
Usage: $html = Session::getCacheLimiter();
Parameters:
|
String |
$name: |
The name of the cache limiter |
API Tags:
Returns an array with the current session cookie information lifetime, path, domain, security...
Usage: $rc = Session::getCookieParams();
API Tags:
| Return: | The cookie param info |
| Static: | |
String getId(
[String
$id = '']
)
|
|
Returns the session ID and set the current id
NOTE: The Session::start() is called, if no id is found Usage: $html = Session::getId(); If GET/POST REQUEST_SID is specified, replace it with the current sid
Parameters:
|
String |
$id: |
The ID to replace current session id |
API Tags:
| Return: | The session id |
| Static: | |
String getModuleName(
[String
$name = '']
)
|
|
Returns the name of the current session module
Usage: $html = Session::getModuleName($name);
Parameters:
|
String |
$name: |
The name of a new module to use |
API Tags:
| Return: | The session module name |
| Static: | |
String getName(
[String
$name = '']
)
|
|
Returns the name of the current session
in the current session Usage: $rc = Session::getName();
Parameters:
|
String |
$name: |
The name to change |
API Tags:
| Return: | The name of the session |
| Static: | |
boolean isRegistered(
String
$name
)
|
|
Returns true, if a variable with the $name is registrered
in the current session Usage: $rc = Session::isRegistered($name);
Parameters:
|
String |
$name: |
The name to check |
API Tags:
| Return: | TRUE on success, FALSE on failure |
| Static: | |
Unregisters (forgets) all variables currently registred
Usage: Session::reset(); NOTE: Why does function unset() {...} fails ? Have to use function reset() {...} instead Could be that the unset() is a predefined function?
API Tags:
int setCacheExpire(
mixed
$time, date
$time,
)
|
|
Set the cache expire time
Usage: $t = Session::setCacheExpire($time); NOTE: Must be called before Session::start()
Parameters:
|
date |
$time,: |
The new expire time |
API Tags:
| Return: | The expiration time |
| Static: | |
String setCacheLimiter(
String
$name
)
|
|
Set the name of the current cache limiter
NOTE: Must be called before Session::start(); Usage: Session::setCacheLimiter($name);
Parameters:
|
String |
$name: |
The name. i.e. private_no_expire,nocache, public, private |
API Tags:
| Return: | The new cache name |
| Static: | |
void setCookieParams(
String
$lifetime, [String
$path = ''], [String
$domain = ''], [String
$security = '']
)
|
|
Sets the cookie parameters
Usage: String Session::setCookieParams($lifetime,$path,$domain);
Parameters:
|
String |
$lifetime: |
The lifetime of the cookie |
|
String |
$path: |
The path, Remember to add '/' in the end |
|
String |
$domain: |
The domain |
|
String |
$security: |
The security flag, boolean |
API Tags:
String setId(
String
$id
)
|
|
Set a new session id and return the session ID
Usage: $html = Session::setId($id);
Parameters:
|
String |
$id: |
The new ID to replace current session id |
API Tags:
| Return: | The session id |
| Static: | |
String setModuleName(
String
$name
)
|
|
Set a new module name for the current session and return the name
Usage: $html = Session::setModuleName($name);
Parameters:
|
String |
$name: |
The new module name to replace current session module name |
API Tags:
| Return: | The session module name |
| Static: | |
String setName(
String
$name
)
|
|
Set the name of the current session and return the name
Usage: $html = Session::setName($name);
Parameters:
|
String |
$name: |
The new name to replace current session name |
API Tags:
| Return: | The session name |
| Static: | |
void setSaveHandler(
String
$open, String
$close, String
$read, String
$write, String
$destroy, String
$gc
)
|
|
Sets the user-level session storage functions
Usage: Session::setSaveHandler($open,$close,$read,$write,$destroy,$gc); NOTE: The $session.save_handler=$user in php.ini
Parameters:
|
String |
$open: |
The open handler |
|
String |
$close: |
The close handler |
|
String |
$read: |
The read handler |
|
String |
$write: |
The write handler |
|
String |
$destroy: |
The destroy handler |
|
String |
$gc: |
The garbage collector handler |
API Tags:
Creates a session or resumes the current one based on
the session id being passed via GET or a cookie Usage: $html = Session::start();
API Tags:
| Return: | TRUE always, never fails |
| Static: | |