Zend_Controller unknown Controller--response

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Zend_Controller unknown Controller--response

Nissan Lifschitz
Currently, in Zend, if a controller does not exist, the index controller
gets called.  However, when that happens the index controller has no
idea that it is being called as a default behavior and also has no
access to the real controller trying to be called.  What is the best
approach to take in order to be able to catch a non-existing controller
and be able to look up the controller name trying to be called.

So, for example, if I call test/hello in the url, and the test
Controller does not exist, I do not want to simply get forwarded to the
index controller, because then, index controller does not no that test
was really trying to be called, and there are scenarios where may want
to perform certain actions based on the fact the test was being called.

I do not want to have to override the core functions in the
Zend_Controller package, as this will lock me out of future updates to
the package.
thanks,
nissan
Reply | Threaded
Open this post in threaded view
|

Re: Zend_Controller unknown Controller--response

Jayson Minard (ZF)
This part of the framework is going through high amount of changes now under
the incubator tree, and issues like this are being looked at.  It is better
to wait a bit for that to settle down to answer this question.  I'll keep
this in mind for work on that component as well.

--j


On 5/21/06 12:29 AM, "Nissan Lifschitz" <[hidden email]> wrote:

> Currently, in Zend, if a controller does not exist, the index controller
> gets called.  However, when that happens the index controller has no
> idea that it is being called as a default behavior and also has no
> access to the real controller trying to be called.  What is the best
> approach to take in order to be able to catch a non-existing controller
> and be able to look up the controller name trying to be called.
>
> So, for example, if I call test/hello in the url, and the test
> Controller does not exist, I do not want to simply get forwarded to the
> index controller, because then, index controller does not no that test
> was really trying to be called, and there are scenarios where may want
> to perform certain actions based on the fact the test was being called.
>
> I do not want to have to override the core functions in the
> Zend_Controller package, as this will lock me out of future updates to
> the package.
> thanks,
> nissan
>