Exemplo n.º 1
0
 /**
  * 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;
 }
Exemplo n.º 2
0
 /**
  * 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;
 }
Exemplo n.º 3
0
 /**
  * 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;
 }