Standard way for local configuration file in Zend Framework

I’ve read people have talked about local configuration files in Zend Framework.

As of Zend Framework 1.10, multiple configuration files is supported by Zend_Application. Here is the right (standardized) approach:

$application = new Zend_Application(
    APPLICATION_ENV,
    array(
        'config' => array(
            APPLICATION_PATH . '/configs/application.ini',
            APPLICATION_PATH . '/configs/local.ini'
        )
    )
);

I hope this small tip becomes spread instead of alternative approaches, that most of the times overload your Zend application.

This entry was posted in php, Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" cssfile="">