-
Notifications
You must be signed in to change notification settings - Fork 0
Famework_Session
LaCodon edited this page Mar 1, 2016
·
1 revision
namespace Famework\Session
This class offers a very simple session handler.
Starts the session (session_start()).
Throws Exception_Session_Start on Error
static void start([bool $secure = FALSE])
Parameter | Purpose |
---|---|
secure | Whether cookie should only be sent over secure connections (HTTPS) |
Sets the current session namespace.
void setNamespace(string $namespace)
Parameter | Purpose |
---|---|
namespace | The Namespace identifier |
Gets the current getNamespace.
string getNamespace()
Parameter | Purpose |
---|---|
RETURN | The current namespace |
Sets a session parameter within the current namespace. If $name
is already set, it will be overridden.
void set(string $name, mixed $value)
Parameter | Purpose |
---|---|
name | The parameter's identifier |
value | The value to store |
Gets a previously stored session parameter from the current namespace.
mixed get(string $name)
Parameter | Purpose |
---|---|
name | The parameter's identifier |
Gets all session parameters of current namespace as array.
array getAll()
Regenerates the session's id.
void regenerateId([bool $delete_old_session = FALSE])
Parameter | Purpose |
---|---|
delete_old_session | TRUE if the session with the old id should get deleted. |
Calls session_destroy()
.
static void destroySession()
- Home
- Getting Started
- Server Setup
- Configuration Files
- Application Structure
- Classes