Class Mage_Core_Model_Mysql4_Collection_Abstract

Description

Magento

NOTICE OF LICENSE

This source file is subject to the Open Software License (OSL 3.0) that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://opensource.org/licenses/osl-3.0.php If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.

DISCLAIMER

Do not edit or add to this file if you wish to upgrade Magento to newer versions in the future. If you wish to customize Magento for your needs please refer to http://www.magentocommerce.com for more information.

Located in /Core/Model/Mysql4/Collection/Abstract.php (line 28)

Varien_Data_Collection_Db
   |
   --Mage_Core_Model_Mysql4_Collection_Abstract
Direct descendents
Class Description
Mage_SalesRule_Model_Mysql4_Coupon_Collection Magento
Mage_SalesRule_Model_Mysql4_Rule_Collection Magento
Mage_SalesRule_Model_Mysql4_Rule_Customer_Collection Magento
Mage_SalesRule_Model_Mysql4_Rule_Product_Collection Magento
Mage_Bundle_Model_Mysql4_Option_Collection Bundle Options Resource Collection
Mage_Directory_Model_Mysql4_Country_Format_Collection Directory country format resource model
Mage_Paypal_Model_Mysql4_Report_Settlement_Row_Collection Resource collection for report rows
Mage_CatalogInventory_Model_Mysql4_Stock_Item_Collection Stock item collection resource model
Mage_GiftMessage_Model_Mysql4_Message_Collection Gift Message collection
Mage_Log_Model_Mysql4_Visitor_Online_Collection Log Online visitors collection
Mage_Cms_Model_Mysql4_Block_Collection CMS block model
Mage_Cms_Model_Mysql4_Page_Collection CMS page collection
Mage_GoogleOptimizer_Model_Mysql4_Code_Collection Google Optimizer collection
Mage_ProductAlert_Model_Mysql4_Stock_Collection Product alert for back in stock collection
Mage_ProductAlert_Model_Mysql4_Price_Collection Product alert for changed price collection
Mage_CatalogSearch_Model_Mysql4_Query_Collection Catalog search query collection
Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Flat_Collection Catalog category flat collection
Mage_Catalog_Model_Resource_Eav_Mysql4_Sendfriend_Collection Magento
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Link_Collection Catalog product links collection
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Type_Configurable_Attribute_Collection Catalog Configurable Product Attribute Collection
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Option_Collection Catalog product options collection
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Option_Value_Collection Catalog product option values collection
Mage_Cron_Model_Mysql4_Schedule_Collection Schedules Collection
Mage_Admin_Model_Mysql4_Permissions_Collection Magento
Mage_Admin_Model_Mysql4_Role_Collection Magento
Mage_Admin_Model_Mysql4_Rules_Collection Magento
Mage_Admin_Model_Mysql4_User_Collection Magento
Mage_Admin_Model_Mysql4_Roles_Collection Magento
Mage_Admin_Model_Mysql4_Roles_User_Collection Magento
Mage_Api_Model_Mysql4_Permissions_Collection Magento
Mage_Api_Model_Mysql4_Role_Collection Magento
Mage_Api_Model_Mysql4_Rules_Collection Magento
Mage_Api_Model_Mysql4_User_Collection Magento
Mage_Api_Model_Mysql4_Acl_Role_Collection Roles collection
Mage_Api_Model_Mysql4_Roles_Collection Magento
Mage_Api_Model_Mysql4_Roles_User_Collection Magento
Mage_Customer_Model_Entity_Form_Attribute_Collection Customer Form Attribute Resource Collection
Mage_Customer_Model_Entity_Group_Collection Customer group collection
Mage_Tag_Model_Mysql4_Tag_Collection Tag collection model
Mage_Tag_Model_Mysql4_Popular_Collection Popular tags collection model
Mage_Newsletter_Model_Mysql4_Queue_Collection Newsletter queue collection.
Mage_Newsletter_Model_Mysql4_Problem_Collection Newsletter problem model collection
Mage_Newsletter_Model_Mysql4_Subscriber_Collection Newsletter Subscribers Collection
Mage_Sales_Model_Mysql4_Quote_Collection Quotes collection
Mage_Sales_Model_Mysql4_Quote_Item_Collection Quote item resource collection
Mage_Sales_Model_Mysql4_Quote_Item_Option_Collection Item option collection
Mage_Sales_Model_Mysql4_Quote_Payment_Collection Quote payments collection
Mage_Sales_Model_Mysql4_Quote_Address_Collection Quote addresses collection
Mage_Sales_Model_Mysql4_Quote_Address_Item_Collection Quote addresses collection
Mage_Sales_Model_Mysql4_Quote_Address_Rate_Collection Quote addresses shiping rates collection
Mage_Sales_Model_Mysql4_Collection_Abstract Flat sales abstract collection
Mage_Sales_Model_Mysql4_Billing_Agreement_Collection Billing agreements resource collection
Mage_Sales_Model_Mysql4_Recurring_Profile_Collection Recurring profile collection
Mage_Sales_Model_Mysql4_Report_Collection_Abstract Magento
Mage_Sales_Model_Mysql4_Order_Status_Collection Flat sales order status history collection
Mage_Sales_Model_Mysql4_Order_Tax_Collection Order Tax Collection
Mage_CatalogRule_Model_Mysql4_Rule_Collection Magento
Mage_CatalogRule_Model_Mysql4_Rule_Product_Price_Collection Magento
Mage_Rule_Model_Mysql4_Rule_Collection Abstract rules collection to be extended
Mage_Index_Model_Mysql4_Event_Collection Magento
Mage_Index_Model_Mysql4_Process_Collection Magento
Mage_Wishlist_Model_Mysql4_Item_Collection Wishlist item collection
Mage_Wishlist_Model_Mysql4_Item_Option_Collection Item option collection
Mage_Wishlist_Model_Mysql4_Wishlist_Collection Wislist model collection
Mage_Dataflow_Model_Mysql4_Profile_Collection Convert profile collection
Mage_Dataflow_Model_Mysql4_Profile_History_Collection Convert history collection
Mage_Dataflow_Model_Mysql4_Import_Collection Import collection
Mage_Dataflow_Model_Mysql4_Batch_Collection Dataflow batch collection
Mage_Shipping_Model_Mysql4_Carrier_Tablerate_Collection Shipping table rates collection
Mage_Checkout_Model_Mysql4_Agreement_Collection Magento
Mage_Eav_Model_Mysql4_Form_Element_Collection Eav Form Element Resource Collection
Mage_Eav_Model_Mysql4_Form_Fieldset_Collection Eav Form Fieldset Resource Collection
Mage_Eav_Model_Mysql4_Form_Type_Collection Eav Form Type Resource Collection
Mage_Eav_Model_Mysql4_Entity_Attribute_Set_Collection Magento
Mage_Eav_Model_Mysql4_Entity_Attribute_Group_Collection Magento
Mage_Eav_Model_Mysql4_Entity_Attribute_Collection EAV attribute resource collection
Mage_Eav_Model_Mysql4_Entity_Attribute_Option_Collection Entity attribute option collection
Mage_Eav_Model_Mysql4_Entity_Type_Collection Magento
Mage_Paygate_Model_Mysql4_Authorizenet_Debug_Collection Magento
Mage_Poll_Model_Mysql4_Poll_Collection Pool Mysql4 collection model resource
Mage_Poll_Model_Mysql4_Poll_Answer_Collection
Mage_Sendfriend_Model_Mysql4_Sendfriend_Collection Sendfriend log resource collection
Mage_Downloadable_Model_Mysql4_Link_Collection Downloadable links resource collection
Mage_Downloadable_Model_Mysql4_Link_Purchased_Collection Downloadable links purchased resource collection
Mage_Downloadable_Model_Mysql4_Link_Purchased_Item_Collection Downloadable links purchased items resource collection
Mage_Downloadable_Model_Mysql4_Sample_Collection Downloadable samples resource collection
Mage_AdminNotification_Model_Mysql4_Inbox_Collection AdminNotification Inbox model
Mage_Reports_Model_Mysql4_Event_Collection Report event collection
Mage_Reports_Model_Mysql4_Event_Type_Collection Report event types collection
Mage_Reports_Model_Mysql4_Wishlist_Collection Wishlist Report collection
Mage_Rating_Model_Mysql4_Rating_Collection Rating collection resource model
Mage_Rating_Model_Mysql4_Rating_Option_Vote_Collection Rating votes collection
Mage_XmlConnect_Model_Mysql4_Queue_Collection Queue resource collection
Mage_XmlConnect_Model_Mysql4_Application_Collection Magento
Mage_XmlConnect_Model_Mysql4_Template_Collection Template resource collection
Mage_XmlConnect_Model_Mysql4_History_Collection History resource collection
Mage_Core_Model_Mysql4_Config_Data_Collection Config data collection
Mage_Core_Model_Mysql4_Variable_Collection Custom variabel collection
Mage_Core_Model_Mysql4_Store_Group_Collection Store group collection
Mage_Core_Model_Mysql4_Store_Collection Stores collection
Mage_Core_Model_Mysql4_Convert_Profile_Collection Convert profile collection
Mage_Core_Model_Mysql4_Convert_History_Collection Convert history collection
Mage_Core_Model_Mysql4_Language_Collection Magento
Mage_Core_Model_Mysql4_Url_Rewrite_Collection Url rewrite resource collection model class
Mage_Core_Model_Mysql4_Website_Collection Websites collection
Mage_Core_Model_Mysql4_Design_Collection Magento
Mage_Tax_Model_Mysql4_Calculation_Collection Tax Calculation Collection
Mage_Tax_Model_Mysql4_Calculation_Rate_Collection Tax rate collection
Mage_Tax_Model_Mysql4_Calculation_Rate_Title_Collection Tax Rate Title Collection
Mage_Tax_Model_Mysql4_Calculation_Rule_Collection Tax rule collection
Mage_Tax_Model_Mysql4_Sales_Order_Tax_Collection Order Tax Collection
Mage_Tax_Model_Mysql4_Class_Collection Tax class collection
Mage_GoogleCheckout_Model_Mysql4_Api_Debug_Collection Magento
Mage_GoogleBase_Model_Mysql4_Item_Collection Google Base items collection
Mage_GoogleBase_Model_Mysql4_Attribute_Collection GoogleBase Attributes collection
Mage_GoogleBase_Model_Mysql4_Type_Collection GoogleBase Item Types collection
Mage_Sitemap_Model_Mysql4_Sitemap_Collection Sitemap resource model collection
Mage_Widget_Model_Mysql4_Widget_Instance_Collection Widget Instance Collection
Class Constant Summary
CACHE_TAG = 'COLLECTION_DATA'
Variable Summary
Method Summary
Mage_Core_Model_Mysql4_Collection_Abstract __construct ([Mage_Core_Model_Mysql4_Abstract $resource = null])
Mage_Eav_Model_Entity_Collection_Abstract addExpressionFieldToSelect (string $alias, string $expression, array $fields)
Mage_Core_Model_Mysql4_Collection_Abstract addFieldToSelect (string|array $field, [string|null $alias = null])
array getAllIds ()
string getMainTable ()
Varien_Object getModelName ([array $args = array()])
Varien_Db_Select getSelect ()
void getTable ( $table)
void join ( $table,  $cond, [ $cols = '*'])
Mage_Core_Model_Mysql4_Collection_Abstract removeFieldFromSelect (string|null $field, [boolean $isAlias = false])
void setResourceModel ( $model)
bool _canUseCache ()
void _construct ()
array _getCacheTags ()
Mage_Core_Model_Mysql4_Collection_Abstract _init (string $model, [ $resourceModel = null])
string _loadCache (Zend_Db_Select $select)
unknown_type _saveCache (array $data, Zend_Db_Select $select)
Variables
string $_eventObject = '' (line 106)

Name of event parameter

  • access: protected

Redefined in descendants as:
string $_eventPrefix = '' (line 99)

Name prefix of events that are dispatched by model

  • access: protected

Redefined in descendants as:
array|null $_fieldsToSelect = null (line 57)

Fields to select in query

  • access: protected
booleam $_fieldsToSelectChanged = false (line 71)

Fields to select changed flag

  • access: protected
array|null $_initialFieldsToSelect = null (line 64)

Fields initial fields to select like id_field

  • access: protected
array $_joinedTables = array() (line 78)

Store joined tables here

  • access: protected
string $_mainTable = null (line 85)

Collection main table

  • access: protected
string $_model (line 36)

Model name

  • access: protected
boolean $_resetItemsDataChanged = false (line 92)

Reset items data changed flag

  • access: protected
Mage_Core_Model_Mysql4_Abstract $_resource (line 50)

Resource instance

  • access: protected
string $_resourceModel (line 43)

Resource model name

  • access: protected
Methods
Constructor __construct (line 113)

Collection constructor

  • access: public
Mage_Core_Model_Mysql4_Collection_Abstract __construct ([Mage_Core_Model_Mysql4_Abstract $resource = null])

Redefined in descendants as:
addExpressionFieldToSelect (line 334)

Add attribute expression (SUM, COUNT, etc)

Example: ('sub_total', 'SUM({{attribute}})', 'revenue') Example: ('sub_total', 'SUM({{revenue}})', 'revenue')

For some functions like SUM use groupByAttribute.

  • access: public
Mage_Eav_Model_Entity_Collection_Abstract addExpressionFieldToSelect (string $alias, string $expression, array $fields)
  • string $alias
  • string $expression
  • array $fields
addFieldToSelect (line 286)

Add field to select

  • access: public
Mage_Core_Model_Mysql4_Collection_Abstract addFieldToSelect (string|array $field, [string|null $alias = null])
  • string|array $field
  • string|null $alias
getAllIds (line 464)

Retrive all ids for collection

  • access: public
array getAllIds ()

Redefined in descendants as:
getMainTable (line 136)

Retrieve main table

  • access: public
string getMainTable ()
getModelName (line 426)

Get model instance

  • access: public
Varien_Object getModelName ([array $args = array()])
  • array $args
getResource (line 446)

Get resource instance

  • access: public

Redefined in descendants as:
getResourceModelName (line 436)
  • access: public
void getResourceModelName ()
getSelect (line 185)

Get Zend_Db_Select instance and applies fields to select if needed

  • access: public
Varien_Db_Select getSelect ()
getTable (line 454)
  • access: public
void getTable ( $table)
  • $table
join (line 477)
  • access: public
void join ( $table,  $cond, [ $cols = '*'])
  • $table
  • $cond
  • $cols
removeAllFieldsFromSelect (line 382)

Removes all fields from select

  • access: public
Mage_Core_Model_Mysql4_Collection_Abstract removeAllFieldsFromSelect ()
removeFieldFromSelect (line 358)

Removes field from select

  • access: public
Mage_Core_Model_Mysql4_Collection_Abstract removeFieldFromSelect (string|null $field, [boolean $isAlias = false])
  • string|null $field
  • boolean $isAlias: Alias identifier
resetItemsDataChanged (line 520)

Set flag data has changed to all collection items

  • access: public
save (line 557)

Save all the entities in the collection

  • access: public
setMainTable (line 151)

Set main collection table

  • access: public
Mage_Core_Model_Mysql4_Collection_Abstract setMainTable (string $table)
  • string $table
setModel (line 411)

Set model name for collection items

  • access: public
Mage_Core_Model_Mysql4_Collection_Abstract setModel (string $model)
  • string $model
setResetItemsDataChanged (line 509)

Set reset items data changed flag

  • access: public
Mage_Core_Model_Mysql4_Collection_Abstract setResetItemsDataChanged (boolean $flag)
  • boolean $flag
setResourceModel (line 431)
  • access: public
void setResourceModel ( $model)
  • $model
_afterLoad (line 534)

Redeclare after load method for specifying collection items original data

  • access: protected

Redefined in descendants as:
_beforeLoad (line 491)

Redeclare before load method for adding event

  • access: protected

Redefined in descendants as:
_canUseCache (line 570)

Check if cache can be used for collection

  • access: protected
bool _canUseCache ()
_construct (line 126)

Initialization here

  • access: protected
void _construct ()

Redefined in descendants as:
_getCacheTags (line 605)

Redeclared for processing cache tags throw application object

  • access: protected
array _getCacheTags ()
_getInitialFieldsToSelect (line 255)

Retrieve initial fields to select like id field

  • access: protected
array _getInitialFieldsToSelect ()
_init (line 395)

Standard resource collection initalization

  • access: protected
Mage_Core_Model_Mysql4_Collection_Abstract _init (string $model, [ $resourceModel = null])
  • string $model
  • $resourceModel
_initInitialFieldsToSelect (line 270)

Initialize initial fields to select like id field

  • access: protected
Mage_Core_Model_Mysql4_Collection_Abstract _initInitialFieldsToSelect ()

Redefined in descendants as:
_initSelect (line 174)

Init collection select

  • access: protected

Redefined in descendants as:
_initSelectFields (line 199)

Init fields for select

  • access: protected
_loadCache (line 581)

Load cached data for select

  • return: | false
  • access: protected
string _loadCache (Zend_Db_Select $select)
  • Zend_Db_Select $select
_saveCache (line 594)

Save collection data to cache

  • access: protected
unknown_type _saveCache (array $data, Zend_Db_Select $select)
  • array $data
  • Zend_Db_Select $select
Class Constants
CACHE_TAG = 'COLLECTION_DATA' (line 30)

Documentation generated on Fri, 11 Feb 2011 16:55:32 +0200 by phpDocumentor 1.4.3