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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:27:35+00:00 2026-05-18T00:27:35+00:00

I really like the way that Magento uses code pools so that classes and

  • 0

I really like the way that Magento uses code pools so that classes and functionality can be extended without actually changing the core functionality of the code.

(for those not familiar with Magento you can have the same class in the “core” code pool and the “local” code pool and when you create a class it first looks in the “local” code pool and if it does not exist it looks in the “core” code pool)

I know that Magneto uses the Zend Framework so I was wondering if Varien used something already inside of the Zend Framework of if they did this themselves? Or if someone knows if there is a good way to effectively do this in Zend Framework?

  • 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-18T00:27:35+00:00Added an answer on May 18, 2026 at 12:27 am

    I dont know how Magento does that (tipp: look at their sourcecode), but you could probably achieve the same with Zend_Autoloader, e.g. when trying to load class Foo_Bar_Baz the autoloader will first look in Local/Foo/Bar/Baz and if the file isn’t there it will try to load from Core/Foo/Bar/Baz.


    Note: If anyone’s interested, take a look at the top of app/Mage.php (excerpt follows) to see how this gets set. –Alan

    if (defined('COMPILER_INCLUDE_PATH')) {
        $appPath = COMPILER_INCLUDE_PATH;
        set_include_path($appPath . PS . Mage::registry('original_include_path'));
        include_once "Mage_Core_functions.php";
        include_once "Varien_Autoload.php";
    } else {
        /**
         * Set include path
         */
        $paths[] = BP . DS . 'app' . DS . 'code' . DS . 'local';
        $paths[] = BP . DS . 'app' . DS . 'code' . DS . 'community';
        $paths[] = BP . DS . 'app' . DS . 'code' . DS . 'core';
        $paths[] = BP . DS . 'lib';
    
        $appPath = implode(PS, $paths);
        set_include_path($appPath . PS . Mage::registry('original_include_path'));
        include_once "Mage/Core/functions.php";
        include_once "Varien/Autoload.php";
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I really like the way padrino 'just works' with compass but I have a
Is there a pythonic preferred way to do this that I would do in
I'm in need of a way to detect mobile browsers server-side. I'd like a
I'm trying to write a custom in-window confirm dialog (based on jQuery UI) that
I've got a .Net 4.0 Workflow application hosted in WCF that takes a request
I'm developing a DAO using Spring JdbcDaoSupport and would like to know if anyone
So I am going through our database and removing some unneeded access levels that
There are many, many, many options out there, but I still couldn't settle with
I have been working on developing some RESTful Services in Django to be used
I have about 20 div's in an aspx page. At any time, only one

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.