Hey there, for such an use case, I wouldn't use "is_readable", as it will cause a stat call in production environment. You can handle this via an environment variable or by always having application.config.local.php and not committing it to your source control system.
Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 24 October 2012 10:45, Christian Ebert <[email protected]> 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: [email protected] > Info: http://framework.zend.com/archives > Unsubscribe: [email protected] > > >
