/** * Convenience feature, calls setControllerDirectory()->setRouter()->dispatch() * * @param string $controllerDirectory */ public static function run($controllerDirectory) { require_once 'Zend/Controller/Router.php'; $frontController = new self(); echo $frontController->setControllerDirectory($controllerDirectory)->setRouter(new Zend_Controller_Router())->dispatch(); }
public static function cloneFromDispatcher(Zend_Controller_Dispatcher_Interface $dispatcher) { $new = new self($dispatcher->getParams()); $new->setControllerDirectory($dispatcher->getControllerDirectory()); $new->setDefaultModule($dispatcher->getDefaultModule()); $new->setDefaultControllerName($dispatcher->getDefaultControllerName()); $new->setDefaultAction($dispatcher->getDefaultAction()); $new->setPathDelimiter($dispatcher->getPathDelimiter()); return $new; }