Public Member Functions | |
__construct () | |
beginTransaction () | |
commit () | |
rollBack () | |
formatDate ($date, $includeTime=true) | |
mktime ($str) | |
Protected Member Functions | |
_construct () | |
_getReadAdapter () | |
_getWriteAdapter () |
Definition at line 34 of file Abstract.php.
__construct | ( | ) |
Reimplemented in Mage_Catalog_Model_Resource_Eav_Mysql4_Category, Mage_Catalog_Model_Resource_Eav_Mysql4_Product, Mage_Customer_Model_Entity_Address, Mage_Customer_Model_Entity_Customer, Mage_Directory_Model_Mysql4_Currency, Mage_Eav_Model_Entity, Mage_Sales_Model_Entity_Order_Address, Mage_Sales_Model_Entity_Order_Creditmemo_Comment, Mage_Sales_Model_Entity_Order_Creditmemo_Item, Mage_Sales_Model_Entity_Order_Creditmemo, Mage_Sales_Model_Entity_Order_Invoice_Comment, Mage_Sales_Model_Entity_Order_Invoice_Item, Mage_Sales_Model_Entity_Order_Invoice, Mage_Sales_Model_Entity_Order_Item, Mage_Sales_Model_Entity_Order_Payment, Mage_Sales_Model_Entity_Order_Shipment_Comment, Mage_Sales_Model_Entity_Order_Shipment_Item, Mage_Sales_Model_Entity_Order_Shipment_Track, Mage_Sales_Model_Entity_Order_Shipment, Mage_Sales_Model_Entity_Order_Status_History, Mage_Sales_Model_Entity_Order, Mage_Sales_Model_Entity_Quote_Address_Item, Mage_Sales_Model_Entity_Quote_Address_Rate, Mage_Sales_Model_Entity_Quote_Address, Mage_Sales_Model_Entity_Quote_Item, Mage_Sales_Model_Entity_Quote_Payment, Mage_Sales_Model_Entity_Quote, Mage_Sales_Model_Mysql4_Order_Address, Mage_Sales_Model_Mysql4_Order_Creditmemo_Comment, Mage_Sales_Model_Mysql4_Order_Creditmemo_Item, Mage_Sales_Model_Mysql4_Order_Creditmemo, Mage_Sales_Model_Mysql4_Order_Invoice_Comment, Mage_Sales_Model_Mysql4_Order_Invoice_Item, Mage_Sales_Model_Mysql4_Order_Invoice, Mage_Sales_Model_Mysql4_Order_Payment, Mage_Sales_Model_Mysql4_Order_Shipment_Comment, Mage_Sales_Model_Mysql4_Order_Shipment_Item, Mage_Sales_Model_Mysql4_Order_Shipment_Track, Mage_Sales_Model_Mysql4_Order_Shipment, Mage_Sales_Model_Mysql4_Order_Status_History, and Mage_Sales_Model_Mysql4_Order.
Definition at line 36 of file Abstract.php.
00037 { 00038 $this->_construct(); 00039 }
_construct | ( | ) | [abstract, protected] |
Resource initialization
Reimplemented in Mage_Admin_Model_Mysql4_Role, Mage_Admin_Model_Mysql4_Roles, Mage_Admin_Model_Mysql4_Rules, Mage_Admin_Model_Mysql4_User, Mage_AdminNotification_Model_Mysql4_Inbox, Mage_AmazonPayments_Model_Mysql4_Api_Debug, Mage_Api_Model_Mysql4_Acl_Role, Mage_Api_Model_Mysql4_Acl, Mage_Api_Model_Mysql4_Role, Mage_Api_Model_Mysql4_Roles, Mage_Api_Model_Mysql4_Rules, Mage_Api_Model_Mysql4_User, Mage_Bundle_Model_Mysql4_Option, Mage_Bundle_Model_Mysql4_Price_Index, Mage_Bundle_Model_Mysql4_Selection, Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Flat, Mage_Catalog_Model_Resource_Eav_Mysql4_Config, Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Attribute_Backend_Media, Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Attribute_Backend_Tierprice, Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Compare_Item, Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer, Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat, Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Link, Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Option_Value, Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Option, Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Status, Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Type_Configurable_Attribute, Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Type_Configurable, Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Website, Mage_Catalog_Model_Resource_Eav_Mysql4_Sendfriend, Mage_Catalog_Model_Resource_Eav_Mysql4_Url, Mage_CatalogIndex_Model_Mysql4_Abstract, Mage_CatalogIndex_Model_Mysql4_Aggregation, Mage_CatalogIndex_Model_Mysql4_Attribute, Mage_CatalogIndex_Model_Mysql4_Data_Abstract, Mage_CatalogIndex_Model_Mysql4_Indexer_Abstract, Mage_CatalogIndex_Model_Mysql4_Indexer_Eav, Mage_CatalogIndex_Model_Mysql4_Indexer_Minimalprice, Mage_CatalogIndex_Model_Mysql4_Indexer_Price, Mage_CatalogIndex_Model_Mysql4_Indexer, Mage_CatalogIndex_Model_Mysql4_Price, Mage_CatalogIndex_Model_Mysql4_Retreiver, Mage_CatalogInventory_Model_Mysql4_Stock_Item, Mage_CatalogInventory_Model_Mysql4_Stock_Status, Mage_CatalogInventory_Model_Mysql4_Stock, Mage_CatalogRule_Model_Mysql4_Rule_Product_Price, Mage_CatalogRule_Model_Mysql4_Rule, Mage_CatalogSearch_Model_Mysql4_Fulltext, Mage_CatalogSearch_Model_Mysql4_Query, Mage_Checkout_Model_Mysql4_Agreement, Mage_Checkout_Model_Mysql4_Cart, Mage_Cms_Model_Mysql4_Block, Mage_Cms_Model_Mysql4_Page, Mage_Core_Model_Mysql4_Config_Data, Mage_Core_Model_Mysql4_Config, Mage_Core_Model_Mysql4_Convert_History, Mage_Core_Model_Mysql4_Convert_Profile, Mage_Core_Model_Mysql4_Design, Mage_Core_Model_Mysql4_Flag, Mage_Core_Model_Mysql4_Language, Mage_Core_Model_Mysql4_Layout, Mage_Core_Model_Mysql4_Store_Group, Mage_Core_Model_Mysql4_Store, Mage_Core_Model_Mysql4_Translate_String, Mage_Core_Model_Mysql4_Translate, Mage_Core_Model_Mysql4_Url_Rewrite, Mage_Core_Model_Mysql4_Website, Mage_Cron_Model_Mysql4_Schedule, Mage_Customer_Model_Entity_Group, Mage_Dataflow_Model_Mysql4_Batch_Export, Mage_Dataflow_Model_Mysql4_Batch_Import, Mage_Dataflow_Model_Mysql4_Batch, Mage_Dataflow_Model_Mysql4_Import, Mage_Dataflow_Model_Mysql4_Profile_History, Mage_Dataflow_Model_Mysql4_Profile, Mage_Dataflow_Model_Mysql4_Session, Mage_Directory_Model_Mysql4_Country_Format, Mage_Directory_Model_Mysql4_Country, Mage_Directory_Model_Mysql4_Currency, Mage_Downloadable_Model_Mysql4_Link_Purchased_Item, Mage_Downloadable_Model_Mysql4_Link_Purchased, Mage_Downloadable_Model_Mysql4_Link, Mage_Downloadable_Model_Mysql4_Sample, Mage_Eav_Model_Entity_Abstract, Mage_Eav_Model_Mysql4_Config, Mage_Eav_Model_Mysql4_Entity_Attribute_Group, Mage_Eav_Model_Mysql4_Entity_Attribute_Option, Mage_Eav_Model_Mysql4_Entity_Attribute_Set, Mage_Eav_Model_Mysql4_Entity_Attribute, Mage_Eav_Model_Mysql4_Entity_Store, Mage_Eav_Model_Mysql4_Entity_Type, Mage_GiftMessage_Model_Mysql4_Message, Mage_GiftRegistry_Model_Mysql4_Gift, Mage_GoogleBase_Model_Mysql4_Attribute, Mage_GoogleBase_Model_Mysql4_Item, Mage_GoogleBase_Model_Mysql4_Type, Mage_GoogleCheckout_Model_Mysql4_Api_Debug, Mage_GoogleCheckout_Model_Mysql4_Tax, Mage_GoogleOptimizer_Model_Mysql4_Code, Mage_Log_Model_Mysql4_Aggregation, Mage_Log_Model_Mysql4_Log, Mage_Log_Model_Mysql4_Visitor_Online, Mage_Log_Model_Mysql4_Visitor, Mage_Media_Model_File_Image, Mage_Newsletter_Model_Mysql4_Problem, Mage_Newsletter_Model_Mysql4_Queue, Mage_Newsletter_Model_Mysql4_Template, Mage_Paygate_Model_Mysql4_Authorizenet_Debug, Mage_Paypal_Model_Mysql4_Api_Debug, Mage_PaypalUk_Model_Mysql4_Api_Debug, Mage_Poll_Model_Mysql4_Poll_Answer, Mage_Poll_Model_Mysql4_Poll_Vote, Mage_Poll_Model_Mysql4_Poll, Mage_ProductAlert_Model_Mysql4_Price, Mage_ProductAlert_Model_Mysql4_Stock, Mage_Rating_Model_Mysql4_Rating_Entity, Mage_Rating_Model_Mysql4_Rating_Option_Vote, Mage_Rating_Model_Mysql4_Rating, Mage_Reports_Model_Mysql4_Event_Type, Mage_Reports_Model_Mysql4_Event, Mage_Review_Model_Mysql4_Review_Summary, Mage_Review_Model_Mysql4_Review, Mage_Rule_Model_Mysql4_Rule, Mage_Sales_Model_Mysql4_Order_Item, Mage_Sales_Model_Mysql4_Order_Tax, Mage_Sales_Model_Mysql4_Quote_Address_Item, Mage_Sales_Model_Mysql4_Quote_Address_Rate, Mage_Sales_Model_Mysql4_Quote_Address, Mage_Sales_Model_Mysql4_Quote_Item_Option, Mage_Sales_Model_Mysql4_Quote_Item, Mage_Sales_Model_Mysql4_Quote_Payment, Mage_Sales_Model_Mysql4_Quote, Mage_SalesRule_Model_Mysql4_Rule_Customer, Mage_SalesRule_Model_Mysql4_Rule_Product, Mage_SalesRule_Model_Mysql4_Rule, Mage_Sendfriend_Model_Mysql4_Sendfriend, Mage_Shipping_Model_Mysql4_Carrier_Tablerate, Mage_Sitemap_Model_Mysql4_Catalog_Category, Mage_Sitemap_Model_Mysql4_Catalog_Product, Mage_Sitemap_Model_Mysql4_Cms_Page, Mage_Sitemap_Model_Mysql4_Sitemap, Mage_Tag_Model_Mysql4_Tag_Relation, Mage_Tag_Model_Mysql4_Tag, Mage_Tax_Model_Mysql4_Calculation_Rate_Title, Mage_Tax_Model_Mysql4_Calculation_Rate, Mage_Tax_Model_Mysql4_Calculation_Rule, Mage_Tax_Model_Mysql4_Calculation, Mage_Tax_Model_Mysql4_Class, Mage_Weee_Model_Mysql4_Attribute_Backend_Weee_Tax, Mage_Weee_Model_Mysql4_Tax, Mage_Wishlist_Model_Mysql4_Item, and Mage_Wishlist_Model_Mysql4_Wishlist.
_getReadAdapter | ( | ) | [abstract, protected] |
Retrieve connection for read data
Reimplemented in Mage_Core_Model_Mysql4_Abstract, Mage_Eav_Model_Entity_Abstract, and Mage_Media_Model_File_Image.
_getWriteAdapter | ( | ) | [abstract, protected] |
Retrieve connection for write data
Reimplemented in Mage_Core_Model_Mysql4_Abstract, Mage_Eav_Model_Entity_Abstract, and Mage_Media_Model_File_Image.
beginTransaction | ( | ) |
Start resource transaction
Definition at line 61 of file Abstract.php.
00062 { 00063 $this->_getWriteAdapter()->beginTransaction(); 00064 return $this; 00065 }
commit | ( | ) |
Commit resource transaction
Definition at line 72 of file Abstract.php.
00073 { 00074 $this->_getWriteAdapter()->commit(); 00075 return $this; 00076 }
formatDate | ( | $ | date, | |
$ | includeTime = true | |||
) |
Format date to internal format
string | | Zend_Date $date | |
bool | $includeTime |
Definition at line 96 of file Abstract.php.
00097 { 00098 if ($date instanceof Zend_Date) { 00099 if ($includeTime) { 00100 return $date->toString(Varien_Date::DATETIME_INTERNAL_FORMAT); 00101 } 00102 else { 00103 return $date->toString(Varien_Date::DATE_INTERNAL_FORMAT); 00104 } 00105 } 00106 00107 if (empty($date)) { 00108 return new Zend_Db_Expr('NULL'); 00109 } 00110 00111 if (!is_numeric($date)) { 00112 $date = strtotime($date); 00113 } 00114 if ($includeTime) { 00115 return date('Y-m-d H:i:s', $date); 00116 } 00117 else { 00118 return date('Y-m-d', $date); 00119 } 00120 }
mktime | ( | $ | str | ) |
rollBack | ( | ) |
Roll back resource transaction
Definition at line 83 of file Abstract.php.
00084 { 00085 $this->_getWriteAdapter()->rollBack(); 00086 return $this; 00087 }