//Zend_Application_Bootstrap_BootstrapAbstract Bootstrap方法理解 protected function _bootstrap($resource = null) { if (null === $resource) { //这里加载全部资源 资源方法和资源插件 get_class_methods获取方法名 foreach ($this->getClassResourceNames() as $resource) { $this->_executeResource($resource);//这里把资源作为属性存贮到Zend_Registry Object setContainer() } // Custom_Benchmark::print_r($this->getContainer());//这里注册了资源 包括autoload FrontController foreach ($this->getPluginResourceNames() as $resource) { $this->_executeResource($resource); } //$bootstrap->bootstrap(array('foo', 'bar')); 加载指定资源 } elseif (is_string($resource)) { $this->_executeResource($resource); } elseif (is_array($resource)) { foreach ($resource as $r) { $this->_executeResource($r); } } else { throw new Zend_Application_Bootstrap_Exception('Invalid argument passed to ' . __METHOD__); } }