views:

440

answers:

1

Hi all, I'm writing a plugin for my Zend Framework app and want to do a quick check to see if a controller exists. Can anyone point me in the right direction?

+5  A: 

Use the isDispatchable - Method of the front controller by passing it a Zend_Controller_Request_Abstract instance.

if( $front->getDispatcher()->isDispatchable($testRequest) )  
{  
    //things to do
}
tharkun
Cheers, you gave me the solution in the time it took to make a cuppa tea!
Kieran Masterton
welcome to SO ;)
tharkun