In PHP there get_object_vars, get_class and methods that return information about the class, we can use the Magento Zend_Debug::dump(), Mage::log() and up XDebug, but during module development in Magento, where we need overwrite some part of the administrative panel, for that we must look for the correct classes.

How to get list of all instantiated classes accessing a page of Magento?

Example: X user accessed Catalog->Attributes->Manage Attribute, how to generate a Debug with the list of all classes that were instantiated when the user accessed the Manage Attribute?

1 Answer 1


Have a look at Mage_Core_Model_Config::getModelInstance

public function getModelInstance($modelClass='', $constructArguments=array())
        $className = $this->getModelClassName($modelClass);
        if (class_exists($className)) {
            $obj = new $className($constructArguments);
            return $obj;
        } else {
            return false;

you can use that method to find all the classes instantiated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.