//$application->bootstrap();//这里返回一个Zend_Registry的容器 其成员属性为bootstrap中的资源方法和资源插件 $application->bootstrap()->run(); public function run() { //这里重写Zend_Application_Bootstrap_Bootstrapper中run方法 $front = $this->getResource('FrontController');//这里明白了从Zend_Registry中得到FrontController; $default = $front->getDefaultModule();//默认的module if (null === $front->getControllerDirectory($default)) { throw new Zend_Application_Bootstrap_Exception( 'No default controller directory registered with front controller' ); } // $front->setParam('bootstrap', $this);//这里把bootstrap载入到了zend_controller_front 就能访问资源了 自认为无用 // Custom_Benchmark::print_r($front); $response = $front->dispatch(); //执行派遣任务 if ($front->returnResponse()) { return $response; } }