示例#1
0
 public function __construct($conn = null)
 {
     parent::__construct();
     if (!is_null($conn)) {
         $this->setConnection($conn);
     }
 }
示例#2
0
 /**
  * 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
0
 /**
  * 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
0
 /**
  * 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
0
 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
0
 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
0
 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
0
 /**
  * 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
0
 public function __construct()
 {
     parent::__construct();
     $this->setItemObjectClass('mzax_emarketing/campaign_preset');
 }
示例#10
0
 /**
  * @param Magento_Filesystem $filesystem
  */
 public function __construct(Magento_Filesystem $filesystem)
 {
     $this->_filesystem = $filesystem;
     parent::__construct();
 }
 public function __construct($conn = null)
 {
     parent::__construct();
     $this->_select = new DMC_Solr_Model_SolrServer_Select();
 }
 public function __construct()
 {
     parent::__construct();
     $this->_api = Mage::getSingleton('eltrino_diamantedesk/api');
 }