Mage_CatalogIndex_Model_Mysql4_Setup Class Reference

Inheritance diagram for Mage_CatalogIndex_Model_Mysql4_Setup:

Mage_Core_Model_Resource_Setup

List of all members.

Public Member Functions

 convertStoreToWebsite ($table)

Protected Member Functions

 _getStoreToWebsiteAssignments ()
 _setWebsiteInfo ($table, $websiteId, $storeIds)

Protected Attributes

 $_storeToWebsite = null


Detailed Description

Definition at line 21 of file Setup.php.


Member Function Documentation

_getStoreToWebsiteAssignments (  )  [protected]

Definition at line 34 of file Setup.php.

00035     {
00036         if (is_null($this->_storeToWebsite)) {
00037             $this->_storeToWebsite = array();
00038             $websiteCollection = Mage::getModel('core/website')->getCollection();
00039             foreach ($websiteCollection as $website) {
00040                 $this->_storeToWebsite[$website->getId()] = $website->getStoreIds();
00041             }
00042         }
00043 
00044         return $this->_storeToWebsite;
00045     }

_setWebsiteInfo ( table,
websiteId,
storeIds 
) [protected]

Definition at line 47 of file Setup.php.

00048     {
00049         $this->getConnection()->update(
00050             $table,
00051             array('website_id'=>$websiteId),
00052             $this->getConnection()->quoteInto('store_id IN (?)', $storeIds)
00053         );
00054 
00055         return $this;
00056     }

convertStoreToWebsite ( table  ) 

Definition at line 25 of file Setup.php.

00026     {
00027         $assignment = $this->_getStoreToWebsiteAssignments();
00028         foreach ($assignment as $website=>$stores) {
00029             $this->_setWebsiteInfo($table, $website, $stores);
00030         }
00031         return $this;
00032     }


Member Data Documentation

$_storeToWebsite = null [protected]

Definition at line 23 of file Setup.php.


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:47 2009 for Magento by  doxygen 1.5.8