简体   繁体   中英

How to check if a controller exists using Zend Framework

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?

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
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM