Creating a session
The real work of creating a session is done in the constructor of the abstract class aliroSession
. You will recall that the concrete class constructors called the parent constructor. It works like this:
protected function __construct() { $this->time = time(); if ('crontrigger' == @$_REQUEST['option']) return true; ini_set('session.use_cookies', 1); ini_set('session.use_only_cookies', 1); $name = md5('aliro_'.$this->_prefix.$this->getIP(). _ALIRO_ABSOLUTE_PATH); session_name($name); if (!session_id()) { $sh = aliroSessionData::getInstance(); session_set_save_handler(array($sh,'sess_open'), array($sh,'sess_close'), array($sh,'sess_read'), array($sh,'sess_write'), array($sh,'sess_destroy'), array($sh,'sess_gc')); session_start(); } }
Because the class is a singleton, the constructor is a protected method. It cannot be called from outside the class, and in fact is only triggered through the getInstance
method.
Before a session is actually started, there is a check...