On Mon, Oct 8, 2012 at 11:41 AM, luk <l...@mierzwa.cc> wrote: > Philip Gabbert wrote > > If I'm reading this correctly, it's saying it's currently not possible to > > catch the event. Just want to make sure I'm seeing what you're directing. > > It technically doesn't answer my question, but appears it may indirectly. > > The error is attempting to render a > > 404: 'Zend\View\Renderer\PhpRenderer::render: Unable to render template > > "404"; resolver could not resolve to a file' > > > > However, since I'm using view files, I don't even want this action. Is > > there a way to overload the View class (like in ZFW1.x)? > > > > Is there some temporary default file I can put into place so I can see > > what's happening? I've tried mapping view/error/404.phtml. I've tried > > putting in the 404 from the skeleton project. None of them allows the 404 > > to actually render... > > > > --- > > Philip > > Post your code form Module.php class and from application config please > then > I may be able to help. > > > > ----- > Cheers, > -- > Luke Mierzwa >
(resent - this time to the list!) I see what's happening now. By default ZFW seems to be looking for a view file for rendering. Template mapping for "404" isn't defined, so thus is errors out. This makes sense since I didn't define a template_map -- it's a REST based application, no .phtml files are to be defined. I want the output to be XML or JSON (if json headers or format=json is passed). Is there a way to define the View layer, within module.config.xml (we're using XML for cross-language compatibility) to JSON or XML return? Or better yet, defining a view class for handling this myself? There aren't many docs about overloading the View layer like there was with ZF1.x. Philip