<?php
/**
 * Created by PhpStorm.
 * User: eater
 * Date: 4/2/16
 * Time: 2:05 PM
 */

namespace Eater\Glim\Service;


use Aura\Session\SessionFactory;

class Session extends Main
{
    /**
     * @param \Slim\Container $c
     * @oaram string name
     * @return \Aura\Session\Session
     */
    static public function init($c, $name)
    {
        $factory = new SessionFactory();
        $session = $factory->newInstance($_COOKIE);
        $session->setName($c->get('sessionName'));

        return $session;
    }
}