protected function changeCurrentId($newId)
    {
        if (!preg_match('/^[-,a-zA-Z0-9]{1,128}$/', $newId)) {
            throw new InvalidArgumentException('Invalid Session ID String');
        }

        if (session_id($newId) === false) {
            throw new SessionRuntimeException('session_id Failed');
        }

        return true;
    }
protected function changeCurrentId($newId)
    {
        if (!preg_match('/^[-,a-zA-Z0-9]{1,128}$/', $newId)) {
            throw new InvalidArgumentException('Invalid Session ID String');
        }

        if (session_id($newId) === false) {
            throw new SessionRuntimeException('session_id Failed');
        }

        return true;
    }
protected function changeCurrentId ( $ newId ) { if ( ! preg_match ( '/^[-,a-zA-Z0-9]{1,128}$/' , $ newId ) ) { throw new InvalidArgumentException ( 'Invalid Session ID String' ) ; } if ( session_id ( $ newId ) === false ) { throw new SessionRuntimeException ( 'session_id Failed' ) ; } return true ; }
Set session id

@param $newId
@return bool
@throws InvalidArgumentException
@throws SessionRuntimeException
Set session id