WP_Session::__construct PHP Method

__construct() protected method

Will rebuild the session collection from the given session ID if it exists. Otherwise, will create a new session with that ID.
protected __construct ( )
    protected function __construct()
    {
        if (isset($_COOKIE[WP_SESSION_COOKIE])) {
            $cookie = stripslashes($_COOKIE[WP_SESSION_COOKIE]);
            $cookie_crumbs = explode('||', $cookie);
            $this->session_id = $cookie_crumbs[0];
            $this->expires = $cookie_crumbs[1];
            $this->exp_variant = $cookie_crumbs[2];
            // Update the session expiration if we're past the variant time
            if (time() > $this->exp_variant) {
                $this->set_expiration();
                delete_option("_wp_session_expires_{$this->session_id}");
                add_option("_wp_session_expires_{$this->session_id}", $this->expires, '', 'no');
            }
        } else {
            $this->session_id = WP_Session_Utils::generate_id();
            $this->set_expiration();
        }
        $this->read_data();
        $this->set_cookie();
    }