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;
});
}