Phosphorum\Bootstrap::initSession PHP Method

initSession() protected method

Start the session the first time some component request the session service.
protected initSession ( )
    protected function initSession()
    {
        $this->di->setShared('session', function () {
            /** @var DiInterface $this */
            $config = $this->getShared('config');
            $adapter = '\\Phalcon\\Session\\Adapter\\' . $config->get('session')->adapter;
            /** @var \Phalcon\Session\AdapterInterface $session */
            $session = new $adapter();
            $session->start();
            return $session;
        });
    }