Method: ::getInstance()

InvSession is scoped to Controllers, public website document, and templates or views as $this->obj_session. However, you may need to access it from other objects which do not have it pre-scoped.

The normal way to access InvSession would be to fetch its singleton object using InvSession::getInstance()

Example:

$obj_session = InvSession::getInstance();
if($obj_session->isLoggedIn()){
   echo 'Welcome Back';
}

Contact Us

Address: 22a Fishergate York, YO10 4AB · Tel: 01904 636677 · Email: info@dotadmin.com