2009年2月11日星期三

[fw-mvc] Using objects created in the bootstrap

If I create an object in my bootstrap file, how do I access it in a Controller.

For example:

Bootstrap:

...

$locale = new Zend_Locale;

...

IndexController:

<?php

class IndexController extends Zend_Controller_Action {

    public function init() {

        $locale->setLocale('fr_FR');
       
    }

    public function indexAction() {


    }

}

The above does not seem to work.

I'm just starting to use ZF, so thanks for the help!

Thanks!

Jason DEBORD
Limoges, France

没有评论: