MvcLite\Session

Session handling class

This class handles all necessary interaction with session information

Synopsis

class Session extends ObjectAbstract {
  • // members
  • protected array $data = ;
  • // Inherited methods from ObjectAbstract
  • public final void __get()
  • public final void __set()
  • public final void __call()
  • public void __toString()
  • public string identify()
  • // Inherited methods from Singleton
  • public static Singleton getInstance()
}

Hierarchy

Coverage

Methods 100% 7 / 7
Lines 100% 18 / 18

Constants

Name Value
MSG_ERR_IDENTIFY 'Descendents must implement the identify method'

Members

protected

  • $data — array
    property to store the data of the session
  • $instanceMvcLite\Traits\Singleton
    Static instance variable

Methods

public

  • __destruct() — Implementation of the magic method __destruct, to save state
  • destroy() — Method to destroy the session
  • getParam() — Method to return a single parameter by name
  • getParams() — Method to retrieve the data param
  • init() — method to start the session.
  • setParam() — Method to set a single parameter value
  • setParams() — Utility method to allow for the setting of multiple parameters

Inherited from MvcLite\ObjectAbstract

public

  • __call() — Overriding the __call magic method
  • __get() — Overriding the __get magic method
  • __set() — Overriding the __set magic method
  • __toString() — returns a string representation of the object
  • identify() — method used to identify the object instance

Inherited from MvcLite\Traits\Singleton

public

History