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 8233701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:13:16+00:00 2026-06-07T18:13:16+00:00

This is a problem that I cannot figure out after hours of googling, the

  • 0

This is a problem that I cannot figure out after hours of googling, the Zend Framework documentation didn’t explain what i needed to know.

I have a file: /application/controllers/RegisterController.php

class RegisterController extends Zend_Controller_Action
{
}

How do I point this file to use classes from: /application/models/User.php

class Application_Model_User
{
}

The code works great when the file is named Register.php

What configurations do i need to make to point a controller to a specific 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-06-07T18:13:18+00:00Added an answer on June 7, 2026 at 6:13 pm

    In your bootstrap, you can start by declaring your namespace:

    protected function _initAutoload() {
        //Autoloader
        $autoLoader = Zend_Loader_Autoloader::getInstance();
        $resourceLoader = new Zend_Loader_Autoloader_Resource(array(
                'basePath' => APPLICATION_PATH,
                'namespace' => '',
                'resourceTypes' => array(
    
                        //Tells the application where to find the models
                        'model' => array(
                                'path' => 'models/',
                                'namespace' => 'Model_'
                                )
                        )
            ));
    
        return $autoLoader;
    }
    

    Your model: /application/models/User.php

    class Model_User extends Zend_Db_Table_Abstract 
    {
    }
    

    Then in you controller: /application/controllers/RegisterController.php

    class RegisterController extends Zend_Controller_Action
    {
    public function indexAction() {
    $model = new Model_User();
    }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this little problem, that I cannot figure out which arguments to pass
So we have this problem that we are trying to figure out. Heres what
I have a problem that I really cannot figure out how to solve. I
I have read a ton about this problem, but I cannot figure it out.
I cannot figure this problem out. Everything in the program works the way i
This seems like an extremely easy problem but alas I cannot figure it out
Update: After some more reading I see that this problem is totally general, you
I'm confused. After stumbling upon this thread, I tried to figure out how to
I'm writing a web service in ColdFusion. The problem is that I cannot figure
Alright, I've spent about 5 hours trying to figure this out. Absolutely none of

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.