本文整理汇总了PHP中Varien_Data_Collection::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Varien_Data_Collection::__construct方法的具体用法?PHP Varien_Data_Collection::__construct怎么用?PHP Varien_Data_Collection::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Varien_Data_Collection
的用法示例。
在下文中一共展示了Varien_Data_Collection::__construct方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($conn = null)
{
parent::__construct();
if (!is_null($conn)) {
$this->setConnection($conn);
}
}
示例2: __construct
/**
* Initialize data to be loaded afterwards
*
* @param array $data
* @return Varien_Data_Collection
*/
public function __construct(array $data)
{
$data = current($data);
if (empty($data)) {
return parent::__construct();
}
$this->_toload = $data;
return parent::__construct();
}
示例3: __construct
/**
* Collection constructor
*
* @param Mage_Core_Model_Mysql4_Abstract $resource
*/
public function __construct($resource = null)
{
Mage::getSingleton('pap/config')->RequirePapAPI();
parent::__construct();
$this->_construct();
$this->_resource = $resource;
// create an API object for communication
$this->_grid = $this->getResource()->createGridObject();
}
示例4: __construct
/**
* Constructor
*
* @param string $path - path to directory
* @param bool $is_recursion - use or not recursion
* @return none
*/
public function __construct($path, $isRecursion = true, $recursionLevel = 0)
{
parent::__construct();
$this->setPath($path);
$this->_dirName = $this->lastDir();
$this->setRecursion($isRecursion);
$this->setRecursionLevel($recursionLevel);
if ($this->getRecursion() || $this->getRecursionLevel() == 0) {
$this->parseDir();
}
}
示例5: __construct
public function __construct()
{
$apikey = Mage::helper('mailchimp')->getApiKey();
$url = "http://" . substr($apikey, -3) . ".sts.mailchimp.com/1.0/ListVerifiedEmailAddresses";
$params = array('apikey' => $apikey);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . '?' . http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
$data = json_decode($result);
if (isset($data->http_code)) {
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('mailchimp')->__('Mailchimp General Error: ') . $data->message);
}
if (isset($data->email_addresses)) {
$this->_emailCollection = $data->email_addresses;
}
return parent::__construct();
}
示例6: __construct
public function __construct()
{
$apikey = Mage::helper('mailchimp')->getApiKey();
$url = "http://" . substr($apikey, -3) . ".sts.mailchimp.com/1.0/ListVerifiedEmailAddresses";
$params = array('apikey' => $apikey);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . '?' . http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
$data = json_decode($result);
//result must be in the following format
//Array ( [Addresses] => Array ( [0] => rodrigod@ebizmarts.com [1] => info@ampcity.co.uk ) [RequestId] => c951b2a4-7cc9-11e0-95a7-35c0647356dc )
if (isset($data->http_code)) {
Mage::getSingleton('core/session')->addError('STS integration not set on mailchimp');
}
if (isset($data->email_addresses)) {
$this->_emailCollection = $data->email_addresses;
}
return parent::__construct();
}
示例7: __construct
public function __construct($xml)
{
if (!is_object($xml) || (string) $xml->errorcode != '0000') {
return parent::__construct();
}
if ((int) $xml->transactions->totalrows >= 1) {
$cols = Mage::helper('sagepayreporting')->getDetailTransactionColumns();
foreach ($xml->transactions->children() as $trn) {
$rn = (string) $trn->rownumber;
if (empty($rn)) {
continue;
}
$new = array('id' => $rn);
foreach ($cols as $k => $v) {
$new[$k] = (string) $trn->{$k};
}
$this->_relatedTransactions[] = $new;
}
}
return parent::__construct();
}
示例8: __construct
/**
* Constructor
*
* Sets default item object class and default sort order.
*/
public function __construct()
{
parent::__construct();
$this->setItemObjectClass(AO::getConfig()->getModelClassName('backup/backup'))->setOrder('time', 'desc');
}
示例9: __construct
public function __construct()
{
parent::__construct();
$this->setItemObjectClass('mzax_emarketing/campaign_preset');
}
示例10: __construct
public function __construct($conn = null)
{
parent::__construct();
$this->_select = new DMC_Solr_Model_SolrServer_Select();
}
示例11: __construct
public function __construct()
{
parent::__construct();
$this->_api = Mage::getSingleton('eltrino_diamantedesk/api');
}