Create an instance of the "cookie" session driver.

@return \Nova\Session\Store
977545
protected function createCookieDriver()
    {
        $lifetime = $this->app['config']['session.lifetime'];

        return $this->buildSession(new CookieSessionHandler($this->app['cookie'], $lifetime));
    }
919158
public function create()
    {
        $instance = self::createStatesGeoZone($this);
        $this->setId($instance->getId());
        return $instance;
    }
30338
protected function registerCookie()
    {
        $this->app->singleton('sentinel.cookie', function ($app) {
            return new IlluminateCookie(
                $app['request'], $app['cookie'], $app['config']->get('cartalyst.sentinel.cookie')
            );
        });
    }
512874
public function createDatabaseDriver()
    {
        $provider = $this->createDatabaseProvider();
        return new Guard($provider, $this->app['session.store'], $this->name);
    }
132017
public function create()
    {
        // Event
        $this->triggerEvent('onBefore' . ucfirst(__FUNCTION__), []);

        $this->triggerEvent('onBeforeStore');

        // Do Action
        $this->getDataMapper()->createOne($this);

        // Event
        $this->triggerEvent('onAfterStore');

        $this->triggerEvent('onAfter' . ucfirst(__FUNCTION__));

        return $this;
    }
915267
protected function createCacheHandler($driver)
    {
        $store = $this->app['config']->get('session.store') ?: $driver;

        $minutes = $this->app['config']['session.lifetime'];

        return new CacheBasedSessionHandler(clone $this->app['cache']->store($store), $minutes);
    }
787465
public static function getSession()
    {
        if (!isset(self::$session)) {
            $session_factory = new SessionFactory();
            self::$session = $session_factory->newInstance($_COOKIE);
        }

        return self::$session;
    }
346881
public function createHandlerByConfig(): \SessionHandlerInterface
    {
        if (!isset($this->getConfig()['driver'])) {
            throw new \InvalidArgumentException('Session driver required');
        }
        $handler = $this->getHandler($this->getConfig()['driver']);
        $handler instanceof LifetimeInterface && $handler->setLifetime($this->getConfig()['lifetime']);
        return $handler;
    }
1061613
protected function registerSession()
	{
		$this->app['sentry.session'] = $this->app->share(function($app)
		{
			$key = $app['config']['cartalyst/sentry::cookie.key'];

			return new IlluminateSession($app['session.store'], $key);
		});
	}
351977
protected function createMemcacheDriver()
    {
        $serverArray    = $this->config['servers'];
        $persistent     = boolval($this->config['persistent']);
        $name           = trim($this->config['server_name']);
        $prefix         = trim($this->config['prefix']);
        $expireTime     = intval($this->config['lifetime']);

        if ($persistent && (strlen($name) > 0)) {
            $memcached  = new Memcached($name);
        } else {
            $memcached  = new Memcached();
        }

        if (!sizeof($memcached->getServerList())) {
            $memcached->addServers($serverArray);
        }

        $store = new MemcachedStore($memcached, $prefix);
        return new CacheSessionHandler($store, $expireTime);
    }
1215490
private function create(): CookieAuthSession
    {
        $response = $this->request($this->endpoint . $this->path, [
            RequestOptions::JSON => [
                'username' => $this->username,
                'password' => $this->password,
            ],
        ]);

        $body = $response->getBody();
        $body->seek(0);
        $contents = $body->getContents();

        $contents = json_decode($contents, true);

        if (isset($contents['session']['name'], $contents['session']['value'])) {
            return new CookieAuthSession($contents['session']['name'], $contents['session']['value']);
        }

        throw new \Exception('Failed to create ' . CookieAuthSession::class . '.');
    }
451302
public function build()
    {
        $client         = $this->buildClient();
        $requestHandler = $this->getRequestHandler();
        // Pass through any configuration options set here which need to be made
        // available elsewhere in the ThisData instance.
        $configuration  = [
            self::CONF_EXPECT_JS_COOKIE => $this->expectJsCookie
        ];

        return new ThisData($client, $requestHandler, $configuration);
    }
312403
protected function buildSession($handler)
    {
        if ($handler instanceOf NullSessionHandler || $handler instanceof SymfonyNullHandler) {
            return parent::buildSession($handler);
        }

        if ($this->app['config']['session.encrypt']) {
            return new EncryptedStore(
                $this->app['config']['session.cookie'],
                $handler,
                $this->app['encrypter'],
                $this->app['config']['session.lockfile_dir']
            );
        } else {
            return new Store(
                $this->app['config']['session.cookie'],
                $handler,
                null,
                $this->app['config']['session.lockfile_dir']
            );
        }
    }
109271
public function createSession()
    {
        $config = $this->app['config']['concrete.session'];
        $storage = $this->getSessionStorage($config);

        // We have to use "build" here because we have bound this classname to this factory method
        $session = $this->app->build(SymfonySession::class, [$storage]);
        $session->setName(array_get($config, 'name'));

        /* @TODO Remove this call. We should be able to set this against the request somewhere much higher than this */
        /*       At the very least we should have an observer that can track the session status and set this */
        $this->app->make(\Concrete\Core\Http\Request::class)->setSession($session);

        return $session;
    }
664052
protected function createClient()
    {
        $client = new MultiCurl();
        $client->setVerifyPeer(false);

        $this->serviceClient = new Browser($client);

        return $this;
    }
1315775
public function create()
    {
        /**
         * @var Store $store
         */
        $classNamespace = $this->getEntityNamespace();
        $store = new $classNamespace();
        $store
            ->setIsCompany(true)
            ->setRoutingStrategy(StoreRoutingStrategy::STRATEGY_PREFIX_EXCEPT_DEFAULT)
            ->setEnabled(true)
            ->setCreatedAt($this->now());

        return $store;
    }
1254488
protected function registerCookie()
    {
        // Registrar cookie
        $this->app->singleton('cookie', function ($app) {
            $config = $app['config']['session'];

            return new CookieManager($config['path'], $config['domain'], $config['secure']);
        });
    }