Session/src/Session.php
public function start()
    {
        // Protection against invalid session cookie names throwing exception: http://php.net/manual/en/function.session-id.php#116836
        if (isset($_COOKIE[session_name()]) && !preg_match('/^[-,a-zA-Z0-9]{1,128}$/', $_COOKIE[session_name()])) {
            unset($_COOKIE[session_name()]);
        }

        if (!session_start()) {
            throw new \RuntimeException('Failed to start session.', 500);
        }

        $this->started = true;

        return $this;
    }
public function start()
    {
        // Protection against invalid session cookie names throwing exception: http://php.net/manual/en/function.session-id.php#116836
        if (isset($_COOKIE[session_name()]) && !preg_match('/^[-,a-zA-Z0-9]{1,128}$/', $_COOKIE[session_name()])) {
            unset($_COOKIE[session_name()]);
        }

        if (!session_start()) {
            throw new \RuntimeException('Failed to start session.', 500);
        }

        $this->started = true;

        return $this;
    }
public function start ( ) { // Protection against invalid session cookie names throwing exception: http://php.net/manual/en/function.session-id.php#116836 if ( isset ( $ _COOKIE [ session_name ( ) ] ) && ! preg_match ( '/^[-,a-zA-Z0-9]{1,128}$/' , $ _COOKIE [ session_name ( ) ] ) ) { unset ( $ _COOKIE [ session_name ( ) ] ) ; } if ( ! session_start ( ) ) { throw new \ RuntimeException ( 'Failed to start session.' , 500 ) ; } $ this -> started = true ; return $ this ; }
Starts the session storage

@return $this
@throws \RuntimeException
Starts the session storage