Do it like a standard ZF2 view strategies (selectRenderer / injectResponse).