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

  • SEARCH
  • Home
  • 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 7802747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:20:52+00:00 2026-06-02T01:20:52+00:00

I am developing a Zend Framework MVC application with some modules, in example, the

  • 0

I am developing a Zend Framework MVC application with some modules, in example, the Users module. There is a model class name “Users_Model_User” that can be used in any module/controller operation. But I need to use an instance of that model in the application Bootstrap class, but there I get an exception:

Fatal error: Class ‘Users_Model_User’ not found in /my/path/…

I have a Bootstrap class for each module:

class Users_Bootstrap extends Zend_Application_Module_Bootstrap {

    protected function _initAutoloader() {
        $autoloader = new Zend_Application_Module_Autoloader(array(
                    'namespace' => 'Users_',
                    'basePath' => APPLICATION_PATH . '/modules/users'
                ));

        return $autoloader;
    }

}

and as I said, the modules are working just fine (reciving requests, processing and returning responses). I think this works fine due to the module bootstrap class, that takes care of loading the default module resources, like model classes. But the main Bootstrap class seems to lack of access to the “Users” module model classes.

  • 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-06-02T01:20:55+00:00Added an answer on June 2, 2026 at 1:20 am

    you could try(not sure it will work)

    protected function __initSomething()
    {
       $this->bootstrap('autoload');
       $model = new Users_Model_User();
       ...
    }
    

    i don’t think bootstrap is a good place to do mysql queries, you should use a Zend_Controller_Plugin_Abstract, that way the resources are initiated and the bootstrap autoload is working(i’m using a plugin myself to do queries and check for permissions…)

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

Sidebar

Related Questions

I am developing a Zend MVC application. Sometimes I like to echo some text
I'm developing a zend framework application that includes a simple email function. The development
I am developing an application using Zend Framework 1.11.10. I have used this article
I am developing the application of login using facebook in Zend Framework. I done
I am developing an application to manage a law office using zend framework 1.10,PHP
I'm developing an application ased on zend framework, and the problem that it is
I'm developing a CMS largely based on Zend Framework components. Some of the database
I am developing a web application with Zend Framework, and I am using JQuery
Am developing an app using zend framework. I want to update some columns in
I'm developing an application in Zend Framework to handle the rentals for a commercial

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.