protected function response($result)
    {
        $response = $this->container->get(Application::RESPONSE);

        if ($result instanceof ResponseInterface)
        {
            return $result;
        }

        $response->stream()->write($result);

        return $response;
    }
protected function response($result)
    {
        $response = $this->container->get(Application::RESPONSE);

        if ($result instanceof ResponseInterface)
        {
            return $result;
        }

        $response->stream()->write($result);

        return $response;
    }
protected function response ( $ result ) { $ response = $ this -> container -> get ( Application :: RESPONSE ) ; if ( $ result instanceof ResponseInterface ) { return $ result ; } $ response -> stream ( ) -> write ( $ result ) ; return $ response ; }
Converts the given result into a ResponseInterface.

@param  mixed $result
@return \Zapheus\Http\Message\ResponseInterface
Converts the given result into a ResponseInterface .