Wg manuala:
$bootstrap->bootstrap('foo'); //czy też
Spowoduje załadowanie tylko tych podanych metod.
Nie wiem, co jest grane, ale mi zawsze ładuje wszystkie, niezależnie od tego czy je wymienię jako ten parametr czy też nie...
Wszystko idzie po default'cie z manuala (?) ^^
http://framework.zend.com/manual/en/zend.a...-operation.html
config
Kod
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
resources.view[] =
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.layout.layout = "default"
resources.layout.viewSuffix = "inc"
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
resources.view.viewSuffix = "inc"
phpSettings.display_errors = 1
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
resources.view[] =
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.layout.layout = "default"
resources.layout.viewSuffix = "inc"
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
resources.view.viewSuffix = "inc"
index:
))); require_once 'Zend/Application.php'; $oApplication = new Zend_Application( APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini' ); $oApplication->bootstrap('view')->run();
Bootstrap:
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { protected function _initFoo() { } /** * View Resource Method * * @return object Obiekt widoku */ protected function _initView() { try { $oView = new Zend_View(); $oView->doctype('XHTML1_STRICT'); $oViewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); $oViewRenderer->setView($oView); $oViewRenderer->setViewSuffix("inc"); return $oView; } catch(Exception $oException) {} } }
W podanym przykłądzie metoda _initFoo jest wywoływana, choc jak na mój gust nei powinna ^^ Powie mi ktoś, o co tu chodzi?