如何使用Zend Framework检查控制器是否存在

Kie*_*ton 3 plugins zend-framework controller

我正在为Zend Framework应用程序编写一个插件,并希望快速检查控制器是否存在.谁能指出我正确的方向?

mar*_*kus 15

使用isDispatchable - 前端控制器的方法,通过传递Zend_Controller_Request_Abstract实例.

if( $front->getDispatcher()->isDispatchable($testRequest) )  
{  
    //things to do
}
Run Code Online (Sandbox Code Playgroud)