The dispatcher doesn't have a function getController()
it does however have a getControllerClass which will return the className or false
which is nice but still won't give you an initialized class to use for the action checking.

Also the headering to /:controller/:action is nice but it should be reverse routed first and have the $request->getBaseUrl() prepended.

I know it's example code but a proper working example would be nice.

Comments

Posted by Wil Sinclair (wil) on 2008-04-18T17:05:56.000+0000

Please evaluate and categorize/assign as necessary.

Posted by Ralph Schindler (ralph) on 2008-04-22T11:56:36.000+0000

Harro,

I am not too clear on what it is your plugin is trying to accomplish.. If you could explain your use case in a bit more detail, it would be easier to understand where you feel the bug is. Have you checked Matthews tutorial on the subject:

The idea is that it will check to see if the controller and action specified actually exist on the preDispatch.
That way you can handle non existing actions and/or controllers in one place instead of getting and parsing the specific exception in the error handler.

It's not that I really need it, it's more that it's posted as example in the docs and it doesn't even work.

It's in paragraph 7.12.3 in the current docs.

Posted by Wil Sinclair (wil) on 2008-06-09T13:13:46.000+0000

Updating component to conform to new IT conventions.

Posted by Wil Sinclair (wil) on 2008-06-09T13:27:46.000+0000

I'm not entirely sure if this is an existing example or a proposed new example. Could the reporter clarify?