<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Tue, 18 Jun 2013 22:09:02 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Alexander Netkachev's Blog: 404 error with Zend Framework Front Controller]]></title>
      <guid>http://www.phpdeveloper.org/news/7434</guid>
      <link>http://www.phpdeveloper.org/news/7434</link>
      <description><![CDATA[<p>
<i>Alexander Netkachev</i> has <a href="http://www.alexatnet.com/blog/2/2007/03/14/404-error-with-zend-framework-front-controller">a new post</a> to his blog that talks about a handy method he discovered when using the Zend Framework to help replace the default "invalid controller" message the Framework gives when hitting a location there's no action for.
</p>
<blockquote>
A few days ago I noted a quick but very usefull tip on how to handle the situation when Front Controller is unable to dispatch the request, i.e. how to display 404 error page instead of Zend_Controller_Dispatcher_Exception with message "Invalid controller specified". And it looks like the common solution for this is to create a front controller plugin. The plugin detects whether the request is dispatchable and changes module/controller/action to appropriate action that will handle the request.
</blockquote>
<p>
<a href="http://www.alexatnet.com/blog/2/2007/03/14/404-error-with-zend-framework-front-controller">His solution</a> uses a NoRoute controller to check and see if there is a valid controller for the requested action. If not, it routes them to a custom controller with a nicer error message. For those that want a bit more low level type of solution, he also includes how to modify the framework itself to perform the same action.
</p>]]></description>
      <pubDate>Thu, 15 Mar 2007 09:39:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Richard Lord's Blog: Managing 404 errors in the Zend Framework]]></title>
      <guid>http://www.phpdeveloper.org/news/7295</guid>
      <link>http://www.phpdeveloper.org/news/7295</link>
      <description><![CDATA[<p>
In <a href="http://www.bigroom.co.uk/blog/managing-404-errors-in-the-zend-framework/">a new entry</a> to his blog today, <i>Richard Lord</i> takes a look at how to gracefully handle 404 errors in a <a href="http://framework.zend.com">Zend Framework</a> application (via a custom plugin).
</p>
<blockquote>
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.
</blockquote>
<p>
The framework makes it easy to create actions link to controllers, but there's still a problem when a requested action isn't there. <a href="http://framework.zend.com/manual/en/zend.controller.plugins.html">His plugin</a> 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.
</p>]]></description>
      <pubDate>Fri, 16 Feb 2007 20:23:00 -0600</pubDate>
    </item>
  </channel>
</rss>
