Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced Mysql4 class names #2526

Merged
merged 2 commits into from
Sep 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public function getGroupTreeJson()
$items = [];
$setId = $this->_getSetId();

/** @var Mage_Eav_Model_Mysql4_Entity_Attribute_Group_Collection $groups */
/** @var Mage_Eav_Model_Resource_Entity_Attribute_Group_Collection $groups */
$groups = Mage::getModel('eav/entity_attribute_group')
->getResourceCollection()
->setAttributeSetFilter($setId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ function (grid, event) {
*/
protected function _prepareCollection()
{
/** @var Mage_Cms_Model_Resource_Block_Collection $collection */
$collection = Mage::getModel('cms/block')->getCollection();
/** @var Mage_Cms_Model_Mysql4_Block_Collection $collection */
$this->setCollection($collection);
return parent::_prepareCollection();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ function (grid, event) {
*/
protected function _prepareCollection()
{
/** @var Mage_Cms_Model_Resource_Page_Collection $collection */
$collection = Mage::getModel('cms/page')->getCollection();
/** @var Mage_Cms_Model_Mysql4_Page_Collection $collection */
$collection->setFirstStoreFlag(true);
$this->setCollection($collection);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public function getGridUrl()
*/
protected function _addColumnFilterToCollection($column)
{
/** @var Mage_Wishlist_Model_Mysql4_Item_Collection $collection */
/** @var Mage_Wishlist_Model_Resource_Item_Collection $collection */
$collection = $this->getCollection();
$value = $column->getFilter()->getValue();
if ($collection && $value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ public function __construct()
*/
protected function _prepareCollection()
{
/** @var Mage_Log_Model_Resource_Visitor_Online_Collection $collection */
$collection = Mage::getModel('log/visitor_online')
->prepare()
->getCollection();
/** @var Mage_Log_Model_Mysql4_Visitor_Online_Collection $collection */
$collection->addCustomerData();

$this->setCollection($collection);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct()
protected function _prepareCollection()
{
$collection = Mage::getResourceModel('reports/order_collection');
/** @var Mage_Reports_Model_Mysql4_Order_Collection $collection */
/** @var Mage_Reports_Model_Resource_Order_Collection $collection */
$collection
->groupByCustomer()
->addOrdersCount()
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Adminhtml/Block/Dashboard/Totals.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected function _prepareLayout()
$isFilter = $this->getRequest()->getParam('store') || $this->getRequest()->getParam('website') || $this->getRequest()->getParam('group');
$period = $this->getRequest()->getParam('period', '24h');

/** @var Mage_Reports_Model_Mysql4_Order_Collection $collection */
/** @var Mage_Reports_Model_Resource_Order_Collection $collection */
$collection = Mage::getResourceModel('reports/order_collection')
->addCreateAtPeriodFilter($period)
->calculateTotals($isFilter);
Expand Down
4 changes: 2 additions & 2 deletions app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Mage_Adminhtml_Block_Newsletter_Subscriber extends Mage_Adminhtml_Block_Te
/**
* Queue collection
*
* @var Mage_Newsletter_Model_Mysql4_Queue_Collection
* @var Mage_Newsletter_Model_Resource_Queue_Collection
*/
protected $_queueCollection = null;

Expand Down Expand Up @@ -59,7 +59,7 @@ protected function _beforeToHtml()
/**
* Return queue collection with loaded neversent queues
*
* @return Mage_Newsletter_Model_Mysql4_Queue_Collection
* @return Mage_Newsletter_Model_Resource_Queue_Collection
*/
public function getQueueCollection()
{
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function __construct()
*/
protected function _prepareCollection()
{
/** @var Mage_CatalogRule_Model_Mysql4_Rule_Collection $collection */
/** @var Mage_CatalogRule_Model_Resource_Rule_Collection $collection */
$collection = Mage::getModel('catalogrule/rule')
->getResourceCollection();
$collection->addWebsitesToResult();
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Adminhtml/Block/Promo/Quote/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function __construct()
*/
protected function _prepareCollection()
{
/** @var Mage_SalesRule_Model_Mysql4_Rule_Collection $collection */
/** @var Mage_SalesRule_Model_Resource_Rule_Collection $collection */
$collection = Mage::getModel('salesrule/rule')
->getResourceCollection();
$collection->addWebsitesToResult();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function getConditionName()
*/
protected function _prepareCollection()
{
/** @var Mage_Shipping_Model_Mysql4_Carrier_Tablerate_Collection $collection */
/** @var Mage_Shipping_Model_Resource_Carrier_Tablerate_Collection $collection */
$collection = Mage::getResourceModel('shipping/carrier_tablerate_collection');
$collection->setConditionFilter($this->getConditionName())
->setWebsiteFilter($this->getWebsiteId());
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Adminhtml/Block/Sitemap/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public function __construct()

protected function _prepareCollection()
{
/** @var Mage_Sitemap_Model_Resource_Sitemap_Collection $collection */
$collection = Mage::getModel('sitemap/sitemap')->getCollection();
/** @var Mage_Sitemap_Model_Mysql4_Sitemap_Collection $collection */
$this->setCollection($collection);
return parent::_prepareCollection();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected function _construct()
*/
protected function _prepareCollection()
{
/** @var Mage_Core_Model_Mysql4_Variable_Collection $collection */
/** @var Mage_Core_Model_Resource_Variable_Collection $collection */
$collection = Mage::getModel('core/variable')->getCollection();
$this->setCollection($collection);
return parent::_prepareCollection();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Mage_Adminhtml_Helper_Catalog_Product_Edit_Action_Attribute extends Mage_C
/**
* Array of same attributes for selected products
*
* @var Mage_Eav_Model_Mysql4_Entity_Attribute_Collection
* @var Mage_Eav_Model_Resource_Entity_Attribute_Collection
*/
protected $_attributes;

Expand Down Expand Up @@ -111,7 +111,7 @@ public function getProductsSetIds()
/**
* Return collection of same attributes for selected products without unique
*
* @return Mage_Eav_Model_Mysql4_Entity_Attribute_Collection
* @return Mage_Eav_Model_Resource_Entity_Attribute_Collection
*/
public function getAttributes()
{
Expand Down
4 changes: 2 additions & 2 deletions app/code/core/Mage/Adminhtml/Helper/Sales.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ public function displayPrices($dataObject, $basePrice, $price, $strong = false,
/**
* Filter collection by removing not available product types
*
* @param Mage_Core_Model_Mysql4_Collection_Abstract $collection
* @return Mage_Core_Model_Mysql4_Collection_Abstract
* @param Mage_Core_Model_Resource_Db_Collection_Abstract $collection
* @return Mage_Core_Model_Resource_Db_Collection_Abstract
*/
public function applySalableProductTypesFilter($collection)
{
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Backup/Model/Db.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Mage_Backup_Model_Db
/**
* Retrieve resource model
*
* @return Mage_Backup_Model_Mysql4_Db
* @return Mage_Backup_Model_Resource_Db
*/
public function getResource()
{
Expand Down
4 changes: 2 additions & 2 deletions app/code/core/Mage/Bundle/Model/Observer.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function appendUpsellProducts($observer)
}
}

/** @var Mage_Bundle_Model_Mysql4_Selection $resource */
/** @var Mage_Bundle_Model_Resource_Selection $resource */
$resource = Mage::getResourceSingleton('bundle/selection');

$productIds = array_keys($collection->getItems());
Expand Down Expand Up @@ -294,7 +294,7 @@ public function catalogProductLoadAfter(Varien_Event_Observer $observer)
* CatalogIndex Indexer after plain reindex process
*
* @deprecated since 1.4.0.0
* @see Mage_Bundle_Model_Mysql4_Indexer_Price
* @see Mage_Bundle_Model_Resource_Indexer_Price
*
* @param Varien_Event_Observer $observer
* @return $this
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Bundle/Model/Product/Price.php
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ public function getMaximalPrice($product)
* Get Options with attached Selections collection
*
* @param Mage_Catalog_Model_Product $product
* @return Mage_Bundle_Model_Mysql4_Option_Collection
* @return Mage_Bundle_Model_Resource_Option_Collection
*/
public function getOptions($product)
{
Expand Down
6 changes: 3 additions & 3 deletions app/code/core/Mage/Bundle/Model/Product/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public function save($product = null)
{
parent::save($product);
$product = $this->getProduct($product);
/** @var Mage_Bundle_Model_Mysql4_Bundle $resource */
/** @var Mage_Bundle_Model_Resource_Bundle $resource */
$resource = Mage::getResourceModel('bundle/bundle');

$options = $product->getBundleOptionsData();
Expand Down Expand Up @@ -708,7 +708,7 @@ public function getSpecifyOptionMessage()
*
* @param array $selectionIds
* @param Mage_Catalog_Model_Product $product
* @return Mage_Bundle_Model_Mysql4_Selection_Collection
* @return Mage_Bundle_Model_Resource_Selection_Collection
*/
public function getSelectionsByIds($selectionIds, $product = null)
{
Expand Down Expand Up @@ -744,7 +744,7 @@ public function getSelectionsByIds($selectionIds, $product = null)
*
* @param array $optionIds
* @param Mage_Catalog_Model_Product $product
* @return Mage_Bundle_Model_Mysql4_Option_Collection
* @return Mage_Bundle_Model_Resource_Option_Collection
*/
public function getOptionsByIds($optionIds, $product = null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function setCollection($collection)
}

/**
* @return Mage_Core_Model_Mysql4_Collection_Abstract
* @return Mage_Core_Model_Resource_Db_Collection_Abstract
*/
public function getCollection()
{
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/CatalogRule/Model/Observer.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ public function prepareCatalogProductPriceIndexTable(Varien_Event_Observer $obse
*/
protected function _checkCatalogRulesAvailability($attributeCode)
{
/** @var Mage_CatalogRule_Model_Mysql4_Rule_Collection $collection */
/** @var Mage_CatalogRule_Model_Resource_Rule_Collection $collection */
$collection = Mage::getResourceModel('catalogrule/rule_collection')
->addAttributeInConditionFilter($attributeCode);

Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Checkout/controllers/CartController.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ public function addgroupAction()
->addFilterByCustomerId($customerId)
->addIdFilter($orderItemIds)
->load();
/** @var Mage_Sales_Model_Mysql4_Order_Item_Collection $itemsCollection */
/** @var Mage_Sales_Model_Resource_Order_Item_Collection $itemsCollection */
$cart = $this->_getCart();
foreach ($itemsCollection as $item) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

/** @var Mage_Checkout_Model_Mysql4_Setup $installer */
/** @var Mage_Checkout_Model_Resource_Setup $installer */
$installer = $this;
$installer->startSetup();
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

/** @var Mage_Checkout_Model_Mysql4_Setup $installer */
/** @var Mage_Checkout_Model_Resource_Setup $installer */
$installer = $this;

$installer->startSetup();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

/** @var Mage_Checkout_Model_Mysql4_Setup $installer */
/** @var Mage_Checkout_Model_Resource_Setup $installer */
$installer = $this;

$installer->startSetup();
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Core/Model/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ abstract class Mage_Core_Model_Abstract extends Varien_Object
/**
* Resource model instance
*
* @var Mage_Core_Model_Mysql4_Abstract
* @var Mage_Core_Model_Resource_Db_Abstract
*/
protected $_resource;

Expand Down
3 changes: 2 additions & 1 deletion app/code/core/Mage/Core/Model/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -1434,11 +1434,12 @@ public function getModelClassName($modelClass)
* Example:
* $config->getModelInstance('catalog/product')
*
* Will instantiate Mage_Catalog_Model_Mysql4_Product
* Will instantiate Mage_Catalog_Model_Resource_Product
*
* @param string $modelClass
* @param array|object $constructArguments
* @return Mage_Core_Model_Abstract|false
* @see Mage_Catalog_Model_Resource_Product
*/
public function getModelInstance($modelClass = '', $constructArguments = [])
{
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Core/Model/Translate/Inline.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public function processAjaxPost($translate)
return $this;
}

/** @var Mage_Core_Model_Mysql4_Translate_String $resource */
/** @var Mage_Core_Model_Resource_Translate_String $resource */
$resource = Mage::getResourceModel('core/translate_string');
foreach ($translate as $t) {
if (Mage::getDesign()->getArea() == 'adminhtml') {
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Core/Model/Variable.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function validate()
*/
public function getVariablesOptionArray($withGroup = false)
{
/** @var Mage_Core_Model_Mysql4_Variable_Collection $collection */
/** @var Mage_Core_Model_Resource_Variable_Collection $collection */
$collection = $this->getCollection();
$variables = [];
foreach ($collection->toOptionArray() as $variable) {
Expand Down
4 changes: 0 additions & 4 deletions app/code/core/Mage/Customer/Model/Convert/Parser/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,6 @@ public function getResource()
{
if (!$this->_resource) {
$this->_resource = Mage::getResourceSingleton('catalog_entity/convert');
#->loadStores()
#->loadProducts()
#->loadAttributeSets()
#->loadAttributeOptions();
}
return $this->_resource;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function getAddNewButtonHtml()
/**
* Retrieve stores collection with default store
*
* @return Mage_Core_Model_Mysql4_Store_Collection
* @return Mage_Core_Model_Resource_Store_Collection
*/
public function getStores()
{
Expand Down
10 changes: 5 additions & 5 deletions app/code/core/Mage/Eav/Model/Entity/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Mage_Eav_Model_Entity_Type extends Mage_Core_Model_Abstract
/**
* Collection of attributes
*
* @var Mage_Eav_Model_Mysql4_Entity_Attribute_Collection
* @var Mage_Eav_Model_Resource_Entity_Attribute_Collection
*/
protected $_attributes;

Expand All @@ -73,7 +73,7 @@ class Mage_Eav_Model_Entity_Type extends Mage_Core_Model_Abstract
/**
* Collection of sets
*
* @var Mage_Eav_Model_Mysql4_Entity_Attribute_Set_Collection
* @var Mage_Eav_Model_Resource_Entity_Attribute_Set_Collection
*/
protected $_sets;

Expand Down Expand Up @@ -102,7 +102,7 @@ public function loadByCode($code)
* Retrieve entity type attributes collection
*
* @param int $setId
* @return Mage_Eav_Model_Mysql4_Entity_Attribute_Collection
* @return Mage_Eav_Model_Resource_Entity_Attribute_Collection
*/
public function getAttributeCollection($setId = null)
{
Expand All @@ -127,7 +127,7 @@ public function getAttributeCollection($setId = null)
/**
* Init and retrieve attribute collection
*
* @return Mage_Core_Model_Mysql4_Collection_Abstract|object
* @return Mage_Core_Model_Resource_Db_Collection_Abstract|object
*/
protected function _getAttributeCollection()
{
Expand All @@ -143,7 +143,7 @@ protected function _getAttributeCollection()
/**
* Retrieve entity tpe sets collection
*
* @return Mage_Eav_Model_Mysql4_Entity_Attribute_Set_Collection
* @return Mage_Eav_Model_Resource_Entity_Attribute_Set_Collection
*/
public function getAttributeSetCollection()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
*/

$installer = $this;
/** @var Mage_GiftMessage_Model_Mysql4_Setup $installer */
/** @var Mage_GiftMessage_Model_Resource_Setup $installer */
$installer->updateAttribute('catalog_product', 'gift_message_available', 'is_configurable', 0);
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

/** @var Mage_GiftMessage_Model_Mysql4_Setup $this */
/** @var Mage_GiftMessage_Model_Resource_Setup $this */
$installer = $this;

$installer->addAttribute('quote', 'gift_message_id', ['type' => 'int', 'visible' => false, 'required' => false]);
Expand Down
Loading