Magento工厂方法中的全类名
在Magento 1中,如果我在工厂方法中使用完整的Magento类名,则可以实例化一个对象 //trying full class name instead of catalog/product $object = Mage::getModel('Mage_Catalog_Model_Product'); 但是,对于助手来说,这是行不通的。如果你试试 Mage::helper('Mage_Core_Helper_Url'); 你得到 Warning: include(Mage/Mage/Core/Helper/Url/Helper/Data.php): failed to open stream: No such file or directory in /path/to/magentolib/Varien/Autoload.php on line 93 #0 /path/to/magentolib/Varien/Autoload.php(93): mageCoreErrorHandler(2, 'include(Mage/Ma...', '/path/to/magent...', 93, Array) #1 /path/to/magentolib/Varien/Autoload.php(93): Varien_Autoload::autoload() #2 [internal function]: Varien_Autoload->autoload('Mage_Mage_Core_...') #3 /path/to/magentoapp/Mage.php(547): spl_autoload_call('Mage_Mage_Core_...') #4 /path/to/magentoapp/code/local/Sebastianjuffar/Commercebug/controllers/IndexController.php(11): …