News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Richard Lord's Blog:
Managing 404 errors in the Zend Framework
February 16, 2007 @ 20:23:00

In a new entry to his blog today, Richard Lord takes a look at how to gracefully handle 404 errors in a Zend Framework application (via a custom plugin).

Early versions of the Zend Framework had a noRoute action that was called when the correct action couldn't be found. This was a way to deal with some page not found errors. At some point it was dropped - I don't know when or why because I only started using the Zend Framework recently. It's still possible to handle non-existent actions using the __call() method of the controller class. But there's no obvious way to deal with all page not found errors in one place, including instances where the controller doesn't exist.

The framework makes it easy to create actions link to controllers, but there's still a problem when a requested action isn't there. His plugin has a solution to that - it is fired off when the action requested doesn't exist and automatically reroutes it to the "noroute" controller to be handled.

21 comments voice your opinion now!
zendframework 404error handle action plugin zendframework 404error handle action plugin


blog comments powered by Disqus

Similar Posts

Pádraic Brady's Blog: Having a bad ViewRenderer day in your ZF app?

Wenbert Del Rosario's Blog: Registering your custom plugins in Zend Framework 1.8

Zend Developer Zone: Zend Framework Beta 0.9.2 Released

Padraic Brady's Blog: Zend Framework 2.0: Dependency Injection (Part 1)

Lee Blue's Blog: How To Implement A Ruby on Rails style before_filter With The PHP Zend Framework


Community Events





Don't see your event here?
Let us know!


release community list unittest developer introduction laravel install bugfix podcast interview api configure language code library threedevsandamaybe wordpress application series

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework