Di Magento 1, jika saya menggunakan nama kelas Magento penuh dalam metode pabrik, saya bisa instantiate objek
//trying full class name instead of catalog/product
$object = Mage::getModel('Mage_Catalog_Model_Product');
Namun, hal yang sama tidak akan berhasil untuk pembantu. Jika kamu mencoba
Mage::helper('Mage_Core_Helper_Url');
Anda mendapatkan
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): Mage::helper('Mage_Core_Helpe...')
#5 /path/to/magentoapp/code/core/Mage/Core/Controller/Varien/Action.php(418): Sebastianjuffar_Commercebug_IndexController->indexAction()
#6 /path/to/magentoapp/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#7 /path/to/magentoapp/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#8 /path/to/magentoapp/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#9 /path/to/magentoapp/Mage.php(684): Mage_Core_Model_App->run(Array)
#10 /path/to/magentoindex.php(87): Mage::run('', 'store')
#11 {main}
Apa yang sedang terjadi?