O'Reilly logo

Magento 2 Developer's Guide by Branko Ajzele

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Session and cookies

Sessions in Magento conform to Magento\Framework\Session\SessionManagerInterface. In the app/etc/di.xml file, there is a definition preference for the SessionManagerInterface class which points to the Magento\Framework\Session\Generic class type. The Session\Generic class is just an empty class that extends the Magento\Framework\Session\SessionManager class, which in turn implements the SessionManagerInterface class.

There is one important object that gets instantiated in the SessionManager instance that conforms to \Magento\Framework\Session\Config\ConfigInterface. On looking at app/etc/di.xml file, we can see a preference for ConfigInterface pointing to a Magento\Framework\Session\Config class type.

Tip

To fully understand the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required