public function getReturnObject($request)
    {
        if (array_key_exists('isBatchPart', $request->options) && $request->options['isBatchPart'] === true) {
            return $request;
        } else {
            return $request->send();
        }
    }
public function getReturnObject($request)
    {
        if (array_key_exists('isBatchPart', $request->options) && $request->options['isBatchPart'] === true) {
            return $request;
        } else {
            return $request->send();
        }
    }
public function getReturnObject ( $ request ) { if ( array_key_exists ( 'isBatchPart' , $ request -> options ) && $ request -> options [ 'isBatchPart' ] === true ) { return $ request ; } else { return $ request -> send ( ) ; } }
Returns the correct object, according to the 'isBatchPart' option.
If it is a Batchpart, it returns the request object, else the response.

@param AbstractHttpRequest $request

@return mixed
Returns the correct object according to the isBatchPart option . If it is a Batchpart it returns the request object else the response .