protected function _sendResponse($response)
    {
        if (is_string($response)) {
            echo $response;

            return;
        }

        $emitter = new ResponseEmitter();
        $emitter->emit($response);
    }
protected function _sendResponse($response)
    {
        if (is_string($response)) {
            echo $response;

            return;
        }

        $emitter = new ResponseEmitter();
        $emitter->emit($response);
    }
protected function _sendResponse ( $ response ) { if ( is_string ( $ response ) ) { echo $ response ; return ; } $ emitter = new ResponseEmitter ( ) ; $ emitter -> emit ( $ response ) ; }
Method that can be easily stubbed in testing.

@param string|\Cake\Http\Response $response Either the message or response object.
@return void
Method that can be easily stubbed in testing .