Yes, the `.local` file would contain `<?php return array();`
Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/



On 24 October 2012 10:57, Matus Zeman <matus.ze...@gmail.com> wrote:

> TBH I think more fail-safe solution is without is_array check - considering
> the contract of config file - it should always return an array. You would
> discover an error if some in the file quicker.
>
> On Wed, Oct 24, 2012 at 9:45 AM, Christian Ebert <ebert.ch...@gmail.com
> >wrote:
>
> > Hi Matus,
> >
> > great to hear. I modified my solution accordingly so that the logic is
> > similar to the global.php/local.php solution and more fail-safe.
> >
> > $appConfig = require 'config/application.config.php';
> >
> > if(is_readable('config/application.config.local.php')){
> >         $localAppConfig = require 'config/application.config.local.php';
> >         if(is_array($localAppConfig)){
> >                 $appConfig =
> > array_merge_recursive($appConfig,$localAppConfig);
> >         }
> > }
> >
> > // Run the application!
> > Zend\Mvc\Application::init($appConfig)->run();
> >
> >
> > --
> > List: fw-general@lists.zend.com
> > Info: http://framework.zend.com/archives
> > Unsubscribe: fw-general-unsubscr...@lists.zend.com
> >
> >
> >
>

Reply via email to