00001 <?php 00002 00003 /** 00004 * Magento 00005 * 00006 * NOTICE OF LICENSE 00007 * 00008 * This source file is subject to the Open Software License (OSL 3.0) 00009 * that is bundled with this package in the file LICENSE.txt. 00010 * It is also available through the world-wide-web at this URL: 00011 * http://opensource.org/licenses/osl-3.0.php 00012 * If you did not receive a copy of the license and are unable to 00013 * obtain it through the world-wide-web, please send an email 00014 * to license@magentocommerce.com so we can send you a copy immediately. 00015 * 00016 * DISCLAIMER 00017 * 00018 * Do not edit or add to this file if you wish to upgrade Magento to newer 00019 * versions in the future. If you wish to customize Magento for your 00020 * needs please refer to http://www.magentocommerce.com for more information. 00021 * 00022 * @category Mage 00023 * @package Mage_Core 00024 * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) 00025 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 00026 */ 00027 00028 /** 00029 * Mage Core convert model 00030 * 00031 * @category Mage 00032 * @package Mage_Core 00033 * @author Magento Core Team <core@magentocommerce.com> 00034 */ 00035 //class Mage_Core_Model_Convert extends Varien_Convert_Profile_Collection 00036 class Mage_Core_Model_Convert extends Mage_Dataflow_Model_Convert_Profile_Collection 00037 { 00038 public function __construct() 00039 { 00040 $classArr = explode('_', get_class($this)); 00041 $moduleName = $classArr[0].'_'.$classArr[1]; 00042 $etcDir = Mage::getConfig()->getModuleDir('etc', $moduleName); 00043 00044 $fileName = $etcDir.DS.'convert.xml'; 00045 if (is_readable($fileName)) { 00046 $data = file_get_contents($fileName); 00047 $this->importXml($data); 00048 } 00049 } 00050 00051 public function getClassNameByType($type) 00052 { 00053 if (strpos($type, '/')!==false) { 00054 return Mage::getConfig()->getModelClassName($type); 00055 } 00056 return parent::getClassNameByType($type); 00057 } 00058 }