Set session cookie parameters, this method should call before session started.

@return  void

@since   2.0
5860
protected function setCookieParams()
    {
        $cookie = $this->getCookieParams();

        if ($this->getOption('force_ssl')) {
            $cookie['secure'] = true;
        }

        if ($this->getOption('cookie_domain')) {
            $cookie['domain'] = $this->getOption('cookie_domain');
        }

        if ($this->getOption('cookie_path')) {
            $cookie['path'] = $this->getOption('cookie_path');
        }

        $this->bridge->setCookieParams(
            $cookie['lifetime'],
            $cookie['path'],
            $cookie['domain'],
            $cookie['secure'],
            true
        );
    }
982502
private function cookie()
    {
        if (!setcookie($this->currentName, $this->currentId, $this->opts->expire,
                $this->opts->path, $this->opts->domain, $this->opts->secure, $this->opts->httponly)
        ) {
            throw new Exception('Failed to set HTTP cookie', 3);
        }
    }
813335
private function initialize()
    {
        $this->name = (isset($this->configurations['name']))
            ? $this->configurations['name']
            : self::DEFAULT_SESSION_NAME;
        $this->assignSessionLifetime();
        if (isset($this->configurations['encryption_enabled'])
            && $this->configurations['encryption_enabled']) {
            $this->handler = new EncryptedSessionHandler();
        }
        $this->security = new SecuritySession($this->configurations);
    }
420642
public function start()
    {

        // we need the session to be started
        if ($this->isStarted()) {
            return;
        }

        // create a new cookie with the session values
        $cookie = new HttpCookie(
            $this->getName(),
            $this->getId(),
            $this->getLifetime(),
            $this->getMaximumAge(),
            $this->getDomain(),
            $this->getPath(),
            $this->isSecure(),
            $this->isHttpOnly()
        );

        // start the session and set the started flag
        $this->getSession()->start();

        // add the cookie to the response
        $this->getRequest()->setRequestedSessionId($this->getId());
        $this->getResponse()->addCookie($cookie);
    }
993607
private function setSession()
    {
        if (isset($_SESSION)) {
            foreach ($_SESSION as $k => $v) {
                $this->log->debug("[ SESSION Params ]" . $k . ": " . $v, []);
                $this->session->$k = $this->setSecurityLevel($v);
                $this->parameters["session"][$k] = $this->setSecurityLevel($v);
            }
        }
    }
1320889
protected function startSession()
    {
        if (@session_status() === \PHP_SESSION_ACTIVE) {
            throw new SessionNotStartedException('Session started already!');
        }

        if (ini_get('session.use_cookies') && headers_sent($file, $line)) {
            throw new SessionNotStartedException(sprintf('Unable to start session, headers already sent by "%s" at line %d.', $file, $line));
        }

        $this->setSessionConfig();

        /*
         | We will start session, if fails
         | we will throw exception to user
         */
        if (!session_start()) {
            throw new SessionNotStartedException('Unable to start session');
        }
    }
560145
public function setSessionData ()
	{
		
		$arr	= $this->toArray ();
		
		$arr['login_timestamp']	= $this->loginTimestamp;
		$arr['last_action']		= $this->lastAction;
		
		$this->session ()->set (get_called_class (), serialize ($arr));
		
	}
503802
protected function startSession()
    {
        if (session_status() == PHP_SESSION_NONE) {

            session_start();

            if(!$this->expireOnClose) {
                setcookie('planet_session', session_id(), time() + ($this->expireTime * 60 ), '/', null, false, false);
            }
        }
    }
64318
public function set_cookie($name, $value = null)
	{
		is_null($value)
			? $this->connection()->__setCookie($name)
			: $this->connection()->__setCookie($name, $value);
	}
514383
public function setCookie()
    {
        $language = current($this->getLanguages());
        if ($language !== Yii::$app->language) {
            $this->cookie->value = Yii::$app->language;
            $this->response->getCookies()->add($this->cookie);
        }
    }
978903
protected function _setup()
    {
            ini_set('session.name', $this->_name);
            ini_set('session.gc_maxlifetime', $this->_lifetime);
            session_set_cookie_params(
        $this->_expiry,
        $this->_path,
        $this->_host,
        $this->_secure,
        $this->_httponly
            );
    }
678291
public static function _init()
	{
		// load the auth config
		\Config::load('ormauth', true);

		// deal with invalid column selections
		if ($columns = \Config::get('ormauth.table_columns', array()) == array('*') or ! is_array($columns))
		{
			\Config::set('ormauth.table_columns', array());
		}

		// setup the remember-me session object if needed
		if (\Config::get('ormauth.remember_me.enabled', false))
		{
			static::$remember_me = \Session::forge(array(
				'driver' => 'cookie',
				'cookie' => array(
					'cookie_name' => \Config::get('ormauth.remember_me.cookie_name', 'rmcookie'),
				),
				'encrypt_cookie' => true,
				'expire_on_close' => false,
				'expiration_time' => \Config::get('ormauth.remember_me.expiration', 86400 * 31),
			));
		}
	}
24768
private function setToDefault():void
    {
        $this->session = null;
        $this->id = null;
        $this->name = null;
    }
611365
public function configureCookie()
    {
        $settingFields = ['expires', 'path', 'domain', 'secure', 'key', 'httpOnly', 'encryption'];
        $settings = $this->config('settings');
        $cookieKey = $this->config('cookieKey');
        foreach ($settingFields as $field) {
            if (isset($settings[$field])) {
                $this->Cookie->configKey($cookieKey, $field, $settings[$field]);
            }
        }
    }
586615
private function setCookiesFromHeaders()
    {
        $this->cookies = [];

        $headers = $this->getHeaderAsArray('Cookie');

        foreach ($headers as $line) {
            foreach (explode(';', $line) as $pair) {
                $cookie = BasicCookie::fromHeader($pair);
                $this->cookies[$cookie->getName()] = $cookie;
            }
        }
    }
837880
protected function start()
	{
		// Start session if not started
		if ($this->state == 'restart')
		{
			session_id($this->createId());
		}
		else
		{
			$session_name = session_name();

			if (!\Request::getVar($session_name, false, 'COOKIE'))
			{
				if ($id = \Request::getVar($session_name))
				{
					session_id($id);
					setcookie($session_name, '', time() - 3600);
				}
				else
				{
					session_id($this->createId());
				}
			}
		}

		session_cache_limiter('none');
		session_start();

		// Regenerate session id if passed a session id that no longer exists
		if ($_SESSION === array())
		{
			session_destroy();
			session_id($this->createId());
			session_start();
		}

		return true;
	}
437031
private function setAllowedCookies()
    {
        $allowed = (isset($_COOKIE["gdpr_cookie"]) ? explode(',', $_COOKIE["gdpr_cookie"]) : []);
        foreach ($this->scopeSettings["scopes"] as $scope) {
            if ($scope['required'] == 1) {
                $allowed[] = $scope['scope'];
            }
        }

        $this->allowedCookies = $allowed;
    }