How to check if controller exists using Zend Framework

I am writing a plugin for my Zend Framework application and I want to quickly check if the controller exists. Can someone point me in the right direction?

+3
source share
1 answer

Use the isDispatchable method, the front controller method, passing it an instance of Zend_Controller_Request_Abstract.

if( $front->getDispatcher()->isDispatchable($testRequest) )  
{  
    //things to do
}
+15
source

Source: https://habr.com/ru/post/1718166/


All Articles