\App\LibSession

Class Session.

A simple helper class to make sessions a little bit more OOP. It needs to be included in the $helpers config property

Summary

Methods
Properties
Constants
start()
get()
end()
flash_message()
set()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

start()

start() : 

Start a new session. PSF automatically starts a new session if this is loaded.

Returns

get()

get( session) : 

Get session data by session name

Parameters

session
  • the session name

Returns

end()

end() : 

Destroy a session

Returns

flash_message()

flash_message( class,  msg) : 

Sets a flash message in session, useful for showing errors or success messages Needs to be called using helper show_slash_msg()

Parameters

class
msg

Returns

set()

set( name,  data) : 

Set session data.

Parameters

name
  • The session name / key
data
  • The session data

Returns