本文整理汇总了PHP中Mage_Core_Model_Resource_Setup::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Resource_Setup::__construct方法的具体用法?PHP Mage_Core_Model_Resource_Setup::__construct怎么用?PHP Mage_Core_Model_Resource_Setup::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Model_Resource_Setup
的用法示例。
在下文中一共展示了Mage_Core_Model_Resource_Setup::__construct方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($resourceName)
{
// Get needed mysql tables
$tempTables = Mage::helper('M2ePro/Module_Database_Structure')->getMySqlTables();
$tempTables = array_merge($this->getMySqlTablesV3(), $tempTables);
$tempTables = array_merge($this->getMySqlTablesV4(), $tempTables);
$tempTables = array_merge($this->getMySqlTablesV5(), $tempTables);
$tempTables = array_merge($this->getRemovedMySqlTables(), $tempTables);
$tempTables = array_values(array_unique($tempTables));
// Sort by length tables
do {
$hasChanges = false;
for ($i = 0; $i < count($tempTables) - 1; $i++) {
if (strlen($tempTables[$i]) < strlen($tempTables[$i + 1])) {
$temp = $tempTables[$i];
$tempTables[$i] = $tempTables[$i + 1];
$tempTables[$i + 1] = $temp;
$hasChanges = true;
}
}
} while ($hasChanges);
// Prepare sql tables
//--------------------
foreach ($tempTables as $table) {
$this->moduleTables[$table] = $this->getTable($table);
}
//--------------------
parent::__construct($resourceName);
}
示例2: __construct
/**
* If Legacy add-on extension installed
* Apply legacy hacks
*
* @param string $resourceName
* @return void
*/
public function __construct($resourceName)
{
if (Mage::helper('wordpress')->isLegacy()) {
if ($helper = Mage::helper('wp_addon_legacy')) {
$helper->applyLegacyHacks();
}
}
parent::__construct($resourceName);
}
示例3: __construct
/**
* Sets _conn to the SQL connection and saves Mongo connection as _mongoConn
*
* @param string $resourceName
*/
public function __construct($resourceName)
{
parent::__construct($resourceName);
$this->_mongoConn = $this->_conn;
$this->_conn = Mage::getSingleton('core/resource')->getConnection('core_setup');
}