本文整理汇总了PHP中Varien_Data_Collection_Db::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Varien_Data_Collection_Db::__construct方法的具体用法?PHP Varien_Data_Collection_Db::__construct怎么用?PHP Varien_Data_Collection_Db::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Varien_Data_Collection_Db
的用法示例。
在下文中一共展示了Varien_Data_Collection_Db::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
parent::__construct(Mage::getSingleton('core/resource')->getConnection('newsletter_read'));
$this->_templateTable = Mage::getSingleton('core/resource')->getTableName('newsletter/template');
$this->_select->from($this->_templateTable, array('template_id', 'template_code', 'template_type', 'template_subject', 'template_sender_name', 'template_sender_email', 'added_at', 'modified_at'));
$this->setItemObjectClass(Mage::getConfig()->getModelClassName('newsletter/template'));
}
示例2: __construct
public function __construct()
{
parent::__construct(Mage::getSingleton('core/resource')->getConnection('review_read'));
$this->_setIdFieldName('status_id');
$this->_reviewStatusTable = Mage::getSingleton('core/resource')->getTableName('review/review_status');
$this->_select->from($this->_reviewStatusTable);
}
示例3: __construct
public function __construct()
{
parent::__construct(AO::getSingleton('core/resource')->getConnection('admin_read'));
$this->_roleTable = AO::getSingleton('core/resource')->getTableName('admin/role');
$this->_select->from($this->_roleTable);
$this->setItemObjectClass(AO::getConfig()->getModelClassName('admin/acl_role'));
}
示例4: __construct
public function __construct()
{
parent::__construct(Mage::getSingleton('core/resource')->getConnection('directory_read'));
$this->_countryTable = Mage::getSingleton('core/resource')->getTableName('directory/country');
$this->_select->from(array('country' => $this->_countryTable));
$this->setItemObjectClass(Mage::getConfig()->getModelClassName('directory/country'));
}
示例5: __construct
/**
* Collection constructor
*
* @param Mage_Core_Model_Mysql4_Abstract $resource
*/
public function __construct($resource = null)
{
parent::__construct();
$this->_construct();
$this->setConnection($this->getEntity()->getReadConnection());
$this->_initSelect();
}
示例6: __construct
public function __construct()
{
parent::__construct(Mage::getSingleton('core/resource')->getConnection('rating_read'));
$this->_ratingOptionTable = Mage::getSingleton('core/resource')->getTableName('rating/rating_option');
$this->_ratingVoteTable = Mage::getSingleton('core/resource')->getTableName('rating/rating_vote');
$this->_select->from($this->_ratingOptionTable);
$this->setItemObjectClass(Mage::getConfig()->getModelClassName('rating/rating_option'));
}
示例7: __construct
public function __construct()
{
parent::__construct(Mage::getSingleton('core/resource')->getConnection('shipping_read'));
$this->_shipTable = Mage::getSingleton('core/resource')->getTableName('av5_correios_shipping/correios');
$this->_select->from(array("s" => $this->_shipTable))->order("valor");
$this->_setIdFieldName('id');
return $this;
}
示例8: __construct
public function __construct()
{
$resources = Mage::getSingleton('core/resource');
parent::__construct($resources->getConnection('tag_read'));
$this->_usersTable = $resources->getTableName('admin/user');
$this->_roleTable = $resources->getTableName('admin/role');
$this->_ruleTable = $resources->getTableName('admin/rule');
}
示例9: __construct
public function __construct()
{
$resources = Mage::getSingleton('core/resource');
parent::__construct($resources->getConnection('livechat_read'));
$this->_livechatTable = $resources->getTableName('livechat/livechat');
$this->_select->from(array('livechat' => $this->_livechatTable), array('*'));
$this->setItemObjectClass(Mage::getConfig()->getModelClassName('livechat/livechat'));
}
示例10: __construct
public function __construct()
{
parent::__construct(Mage::getSingleton('core/resource')->getConnection('prescriptioncheckout_read'));
$this->_shipTable = Mage::getSingleton('core/resource')->getTableName('ecommage_prescription');
$this->_select->from(array("s" => $this->_shipTable))->order(array("prescription_id"));
$this->_setIdFieldName('prescription_id');
return $this;
}
示例11: __construct
public function __construct()
{
$resources = Mage::getSingleton('core/resource');
parent::__construct($resources->getConnection('approveorder_read'));
$this->_kitchenTable = $resources->getTableName('approveorder/kitchen');
$this->_select->from(array('e' => $this->_kitchenTable), array('*'));
$this->setItemObjectClass(Mage::getConfig()->getModelClassName('approveorder/kitchen'));
}
示例12: __construct
public function __construct()
{
$resources = AO::getSingleton('core/resource');
$this->_setIdFieldName('primary_id');
parent::__construct($resources->getConnection('review_read'));
$this->_summaryTable = $resources->getTableName('review/review_aggregate');
$this->_select->from($this->_summaryTable);
$this->setItemObjectClass(AO::getConfig()->getModelClassName('review/review_summary'));
}
示例13: __construct
/**
* Enter description here ...
*
*/
public function __construct()
{
$resources = Mage::getSingleton('Mage_Core_Model_Resource');
$this->_setIdFieldName('primary_id');
parent::__construct($resources->getConnection('review_read'));
$this->_summaryTable = $resources->getTableName('review_entity_summary');
$this->_select->from($this->_summaryTable);
$this->setItemObjectClass(Mage::getConfig()->getModelClassName('Mage_Review_Model_Review_Summary'));
}
示例14: __construct
public function __construct($idFieldName = NULL)
{
$connRead = Mage::getResourceModel('core/config')->getReadConnection();
parent::__construct($connRead);
if (!is_null($idFieldName)) {
$this->_idFieldName = $idFieldName;
}
$table = Mage::getSingleton('core/resource')->getTableName('m2epro_ebay_dictionary_motor_ktype');
$this->getSelect()->reset()->from(array('main_table' => $table));
}
示例15: __construct
public function __construct()
{
parent::__construct(Mage::getSingleton('core/resource')->getConnection('shipping_read'));
$this->_shipTable = Mage::getSingleton('core/resource')->getTableName('matrixrate_shipping/matrixrate');
$this->_countryTable = Mage::getSingleton('core/resource')->getTableName('directory/country');
$this->_regionTable = Mage::getSingleton('core/resource')->getTableName('directory/country_region');
$this->_select->from(array("s" => $this->_shipTable))->joinLeft(array("c" => $this->_countryTable), 'c.country_id = s.dest_country_id', 'iso3_code AS dest_country')->joinLeft(array("r" => $this->_regionTable), 'r.region_id = s.dest_region_id', 'code AS dest_region')->order(array("dest_country", "dest_region", "dest_zip"));
$this->_setIdFieldName('pk');
return $this;
}