/** * Return class path * * @param unknown_type $class */ public function getClassPath($class) { $classArray = explode('_', $class); $editor = trim($classArray[0]); $module = trim($classArray[1]); $moduleInfo = mage::getConfig()->getModuleConfig($editor . '_' . $module); $moduleInfo = $moduleInfo->asArray(); $path = mage::getBaseDir('base') . DS . 'app' . DS . 'code' . DS . $moduleInfo['codePool'] . DS . str_replace('_', DS, $class) . '.php'; return $path; }
/** * return magento type (edition) * * @return string */ protected function _getEdition() { $edition = self::TYPE_COMMUNITY; if (method_exists('Mage', 'getEdition')) { $edition = Mage::getEdition(); } else { $dir = mage::getBaseDir('code') . DS . 'core' . DS . self::TYPE_ENTERPRISE; if (file_exists($dir)) { $edition = self::TYPE_ENTERPRISE; } } return $edition; }
/** * get edition of magento * * @return string */ public function getEdition() { $edition = self::COMMUNITY_EDITION; if (method_exists('Mage', 'getEdition')) { $edition = Mage::getEdition(); } else { $dir = mage::getBaseDir('code') . DS . 'core' . DS . self::ENTERPRISE_EDITION; if (file_exists($dir)) { $edition = self::ENTERPRISE_EDITION; } } return $edition; }