public function __construct() { if ('' === session_id()) { // no session currently exists, start a new one session_start(); } }