Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7402003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:37:45+00:00 2026-05-29T04:37:45+00:00

I want to write a php application using Zend Framework 2 (just the beta

  • 0

I want to write a php application using Zend Framework 2 (just the beta 2 yet).

Because it’s going to be a collection of several webservices I decided to seperate it into different modules (with own databases).

Before starting to write the first module I want to write the code wich each module should need. For example the layout. Each module uses the same layout. That’s why I want to write it globally to improve the development process of single modules.

How can I provide defaults for each module globally? (e.g. layout, plugin, default database model, …)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T04:37:46+00:00Added an answer on May 29, 2026 at 4:37 am

    In ZendFramework2 configurations from all modules are always merged.
    Additionally there is a global config which can overwrite module-wise config.
    So including a vendor module brings in a default configuration you can and should overwrite via your global config.
    The global config may consist of multiple files making it easy to distinguish between modules-to-be-configured.

    The first example I have is an article of akrabat about module configuration and overrides.

    Another nice example of this pattern is Akrabat’s quickstart (https://github.com/akrabat/zf2-tutorial):

    • one App module, based on ZendSkeletonApp
    • one Album module, the part you actually did.

    In the App module there is config for the basic routing, Views and the Layout are set up
    In the Album module there is only the set-up for Album-specific things (e.g. dependency injection), the view and routing are used from the App-modules config.

    You may decide to overwrite this config on a per-module basis or globally, in the default project layout your configs are placed like this:

    /config/application.config.php the base configuration
    /config/autoload/*.config.php may be used to overwrite modules or app config (e.g. for local development)
    /module/[your-module]/config/[your-module].config.php the default configuration of your module
    /vendor/[vendor-module]/config/[vendor-module].config.php a module you dropped in, but has definitions for it’s dependency injection. if it uses e.g. a database you want to overwrite some parameters in your /config/autoload/*

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP web application developed using symfony framework. I want to call
I'm using PHP Zend framework for my web application. When users register, I send
I want to write a PHP application that is going to do some checks
I want to write batch file for my own php framework. for example i
I'm using v1.3 of the Propel PHP framework for an application, and I can't
We have an old legacy PHP application. Now I want to write a new
I'm not creating a plug-in, just using the application. I want the right click
I'm using Zend-Framework 1.9.5 to make a web-application, But it's Url_Helper was quite tricky
I'm using Zend Framework for an application called Pricetag , and we're thinking of
I want to write a php script that keeps the apache_log file open and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.