當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Varien_Data_Collection::__construct方法代碼示例

本文整理匯總了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);
     }
 }
開發者ID:vijays91,項目名稱:Magento-My-Order-Search,代碼行數:7,代碼來源:Db.php

示例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();
 }
開發者ID:CEMD-CN,項目名稱:magemonkey,代碼行數:15,代碼來源:Customcollection.php

示例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();
 }
開發者ID:AmineCherrai,項目名稱:rostanvo,代碼行數:14,代碼來源:Abstract.php

示例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();
     }
 }
開發者ID:natxetee,項目名稱:magento2,代碼行數:18,代碼來源:Collection.php

示例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();
 }
開發者ID:votanlean,項目名稱:Magento-Pruebas,代碼行數:19,代碼來源:Sts.php

示例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();
 }
開發者ID:votanlean,項目名稱:Magento-Pruebas,代碼行數:21,代碼來源:Collection.php

示例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();
 }
開發者ID:MadMaxAi,項目名稱:sage-pay-suite-ce,代碼行數:21,代碼來源:Collection.php

示例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');
 }
開發者ID:ronseigel,項目名稱:agent-ohm,代碼行數:10,代碼來源:Fs_Collection.php

示例9: __construct

 public function __construct()
 {
     parent::__construct();
     $this->setItemObjectClass('mzax_emarketing/campaign_preset');
 }
開發者ID:sakibanda,項目名稱:emarketing,代碼行數:5,代碼來源:Collection.php

示例10: __construct

 public function __construct($conn = null)
 {
     parent::__construct();
     $this->_select = new DMC_Solr_Model_SolrServer_Select();
 }
開發者ID:georgebabarus,項目名稱:Magento-Solr,代碼行數:5,代碼來源:AbstractCollection.php

示例11: __construct

 public function __construct()
 {
     parent::__construct();
     $this->_api = Mage::getSingleton('eltrino_diamantedesk/api');
 }
開發者ID:eltrino,項目名稱:DiamanteDeskMagentoExtension,代碼行數:5,代碼來源:Collection.php


注:本文中的Varien_Data_Collection::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。