Anthony
Anthony

Reputation: 3218

Where is catalog helper declared?

I cannot find any declaration in the config or other files.

I tried to find smth like:

<helpers>
   <catalog>
      <class>Mage_Catalog_Helper</class>
   </catalog>
</helpers>

But there are no any entry even Mage_Catalog_Helper_Image.

Could someone to help to find it?

Upvotes: 2

Views: 149

Answers (1)

clockworkgeek
clockworkgeek

Reputation: 37700

The autoloader cheats. If it cannot find a definition for an alias (eg. "catalog") then it assumes it must be a Mage module. You can put in any unknown alias and see the same thing happen. For example calling:

Mage::getModel('foo/bar');

...produces an error like:

Fatal error: Class 'Mage_Foo_Model_Bar' not found

That is why you cannot find the catalog helper declaration; there is none. But you can create your own and it will take precedence.

Upvotes: 4

Related Questions