* @package oat\tao\model */ class PretenderSession extends common_session_DefaultSession { /** * Real user session * * @var common_session_Session */ private $internalSession; /** * @param User $user */ public function __construct(User $user) { parent::__construct($user); $this->internalSession = common_session_SessionManager::getSession(); } /** * Revert back to the original Session */ public function restoreOriginal() { common_session_SessionManager::startSession($this->internalSession); } }