当前位置: 首页>>代码示例>>PHP>>正文


PHP Oara_Utilities::soapConverter方法代码示例

本文整理汇总了PHP中Oara_Utilities::soapConverter方法的典型用法代码示例。如果您正苦于以下问题:PHP Oara_Utilities::soapConverter方法的具体用法?PHP Oara_Utilities::soapConverter怎么用?PHP Oara_Utilities::soapConverter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Oara_Utilities的用法示例。


在下文中一共展示了Oara_Utilities::soapConverter方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getMerchant

 /**
  * Get the merchant for an Id
  * @param integer $merchantId
  * @return array
  */
 public function getMerchant(array $merchantIds = null)
 {
     $merchantList = array();
     if ($merchantIds != null) {
         $iteration = 0;
         $arraySlice = array_slice($merchantIds, $this->_pageSize * $iteration, $this->_pageSize);
         while (!empty($arraySlice)) {
             $params = array();
             $params['aMerchantIds'] = $arraySlice;
             $merchantApiList = $this->_apiClient->getMerchant($params)->getMerchantReturn;
             $merchantList = array_merge($merchantList, Oara_Utilities::soapConverter($merchantApiList, $this->_merchantConverterConfiguration));
             $iteration++;
             $arraySlice = array_slice($merchantIds, $this->_pageSize * $iteration, $this->_pageSize);
         }
     }
     return $merchantList;
 }
开发者ID:netzkind,项目名称:php-oara,代码行数:22,代码来源:AffiliateWindow.php

示例2: getTransactionList

 /**
  * (non-PHPdoc)
  * @see library/Oara/Network/Oara_Network_Publisher_Base#getTransactionList($merchantId,$dStartDate,$dEndDate)
  */
 public function getTransactionList($merchantList = null, Zend_Date $dStartDate = null, Zend_Date $dEndDate = null, $merchantMap = null)
 {
     $totalTransactions = array();
     //Set the webservice
     $publisherStatisticsServiceUrl = 'https://api.affili.net/V2.0/PublisherStatistics.svc?wsdl';
     $publisherStatisticsService = new Oara_Import_Soap_Client($publisherStatisticsServiceUrl, array('compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | SOAP_COMPRESSION_DEFLATE, 'soap_version' => SOAP_1_1));
     $iterationNumber = self::calculeIterationNumber(count($merchantList), 100);
     for ($currentIteration = 0; $currentIteration < $iterationNumber; $currentIteration++) {
         $merchantListSlice = array_slice($merchantList, 100 * $currentIteration, 100);
         $merchantListAux = array();
         foreach ($merchantListSlice as $merchant) {
             $merchantListAux[] = (string) $merchant;
         }
         //Call the function
         $params = array('StartDate' => strtotime($dStartDate->toString("yyyy-MM-dd")), 'EndDate' => strtotime($dEndDate->toString("yyyy-MM-dd")), 'TransactionStatus' => 'All', 'ProgramIds' => $merchantListAux);
         $currentPage = 1;
         $transactionList = self::affilinetCall('transaction', $publisherStatisticsService, $params, 0, $currentPage);
         while (isset($transactionList->TotalRecords) && $transactionList->TotalRecords > 0 && isset($transactionList->TransactionCollection->Transaction)) {
             $transactionCollection = array();
             if (!is_array($transactionList->TransactionCollection->Transaction)) {
                 $transactionCollection[] = $transactionList->TransactionCollection->Transaction;
             } else {
                 $transactionCollection = $transactionList->TransactionCollection->Transaction;
             }
             $transactionList = Oara_Utilities::soapConverter($transactionCollection, $this->_transactionConverterConfiguration);
             foreach ($transactionList as $transaction) {
                 //$transaction['merchantId'] = 3901;
                 $tDate = new Zend_Date($transaction["date"], "yyyy-MM-ddTHH:mm:ss");
                 $transaction["date"] = $tDate->toString("yyyy-MM-dd HH:mm:ss");
                 if ($transaction['status'] == 'Confirmed') {
                     $transaction['status'] = Oara_Utilities::STATUS_CONFIRMED;
                 } else {
                     if ($transaction['status'] == 'Open') {
                         $transaction['status'] = Oara_Utilities::STATUS_PENDING;
                     } else {
                         if ($transaction['status'] == 'Cancelled') {
                             $transaction['status'] = Oara_Utilities::STATUS_DECLINED;
                         }
                     }
                 }
                 $totalTransactions[] = $transaction;
             }
             $currentPage++;
             $transactionList = self::affilinetCall('transaction', $publisherStatisticsService, $params, 0, $currentPage);
         }
     }
     return $totalTransactions;
 }
开发者ID:netzkind,项目名称:php-oara,代码行数:52,代码来源:AffiliNet.php

示例3: getTransactionList

 /**
  * (non-PHPdoc)
  * @see library/Oara/Network/Oara_Network_Base#getTransactionList($merchantId,$dStartDate,$dEndDate)
  */
 public function getTransactionList($merchantList = null, Zend_Date $dStartDate = null, Zend_Date $dEndDate = null)
 {
     $totalTransactions = array();
     $dStartDate = clone $dStartDate;
     $dStartDate->setHour("00");
     $dStartDate->setMinute("00");
     $dStartDate->setSecond("00");
     $dEndDate = clone $dEndDate;
     $dEndDate->setHour("23");
     $dEndDate->setMinute("59");
     $dEndDate->setSecond("59");
     foreach ($this->_campaignMap as $campaignKey => $campaignValue) {
         $transactionList = $this->_soapClient->getDetailedEarnings($dStartDate->getIso(), $dEndDate->getIso(), $campaignKey, $this->_exportTransactionParameters['username'], $this->_exportTransactionParameters['password']);
         foreach ($transactionList as $transaction) {
             if (in_array($transaction->programID, $merchantList)) {
                 $transaction->merchantId = $transaction->programID;
                 if ($transaction->status == 'confirmed') {
                     $transaction->status = Oara_Utilities::STATUS_CONFIRMED;
                 } else {
                     if ($transaction->status == 'delayed') {
                         $transaction->status = Oara_Utilities::STATUS_PENDING;
                     } else {
                         if ($transaction->status == 'cancelled') {
                             $transaction->status = Oara_Utilities::STATUS_DECLINED;
                         } else {
                             throw new Exception('Error in the transaction status');
                         }
                     }
                 }
                 $transactionDate = new Zend_Date($transaction->date, "yyyy-MM-ddTHH:mm:ss");
                 $transaction->date = $transactionDate->toString("yyyy-MM-dd HH:mm:ss");
                 $transaction->websiteId = $campaignKey;
                 $totalTransactions[] = $transaction;
             }
         }
     }
     $totalTransactions = Oara_Utilities::soapConverter($totalTransactions, $this->_transactionConverterConfiguration);
     return $totalTransactions;
 }
开发者ID:robryanx,项目名称:php-oara,代码行数:43,代码来源:WebGains.php

示例4: getOverviewList

 /**
  * (non-PHPdoc)
  * @see library/Oara/Network/Oara_Network_Base#getOverviewList($merchantId,$dStartDate,$dEndDate)
  */
 public function getOverviewList($transactionList = null, $merchantList = null, Zend_Date $dStartDate = null, Zend_Date $dEndDate = null)
 {
     $totalOverview = array();
     //At first, we need to be sure that there are some data.
     $auxStartDate = clone $dStartDate;
     $auxStartDate->setHour("00");
     $auxStartDate->setMinute("00");
     $auxStartDate->setSecond("00");
     $auxEndDate = clone $dEndDate;
     $auxEndDate->setHour("23");
     $auxEndDate->setMinute("59");
     $auxEndDate->setSecond("59");
     $params = array();
     $params['sDateType'] = 'transaction';
     if ($dStartDate != null) {
         $params['dStartDate'] = $auxStartDate->toString("yyyy-MM-ddTHH:mm:ss");
     }
     if ($dEndDate != null) {
         $params['dEndDate'] = $auxEndDate->toString("yyyy-MM-ddTHH:mm:ss");
     }
     if ($merchantList != null) {
         $params['aMerchantIds'] = $merchantList;
     }
     $params['iOffset'] = null;
     $params['iLimit'] = $this->_pageSize;
     $clickStats = $this->_apiClient->getClickStats($params);
     $impressionStats = $this->_apiClient->getImpressionStats($params);
     $transactionList = Oara_Utilities::transactionMapPerDay($transactionList);
     if (count($clickStats->getClickStatsReturn) > 0 || count($impressionStats->getImpressionStatsReturn) > 0 || count($transactionList) > 0) {
         unset($clickStats);
         unset($impressionStats);
         $dateArray = Oara_Utilities::daysOfDifference($dStartDate, $dEndDate);
         for ($i = 0; $i < sizeof($dateArray); $i++) {
             $groupMap = array();
             $auxStartDate = clone $dateArray[$i];
             $auxStartDate->setHour("00");
             $auxStartDate->setMinute("00");
             $auxStartDate->setSecond("00");
             $auxEndDate = clone $dateArray[$i];
             $auxEndDate->setHour("23");
             $auxEndDate->setMinute("59");
             $auxEndDate->setSecond("59");
             $params = array();
             $params['sDateType'] = 'transaction';
             if ($dStartDate != null) {
                 $params['dStartDate'] = $auxStartDate->toString("yyyy-MM-ddTHH:mm:ss");
             }
             if ($dEndDate != null) {
                 $params['dEndDate'] = $auxEndDate->toString("yyyy-MM-ddTHH:mm:ss");
             }
             if ($merchantList != null) {
                 $params['aMerchantIds'] = $merchantList;
             }
             $params['iOffset'] = null;
             $params['iLimit'] = $this->_pageSize;
             $clickStats = $this->_apiClient->getClickStats($params);
             if (count($clickStats->getClickStatsReturn) > 0) {
                 $groupMap = self::groupOverview($groupMap, Oara_Utilities::soapConverter($clickStats->getClickStatsReturn, $this->_clickConverterConfiguration));
                 $iteration = self::calculeIterationNumber($clickStats->getClickStatsCountReturn->iRowsAvailable, $this->_pageSize);
                 unset($clickStats);
                 for ($j = 1; $j < $iteration; $j++) {
                     $params['iOffset'] = $this->_pageSize * $j;
                     $clickStats = $this->_apiClient->getClickStats($params);
                     $groupMap = self::groupOverview($groupMap, Oara_Utilities::soapConverter($clickStats->getClickStatsReturn, $this->_clickConverterConfiguration));
                     unset($clickStats);
                     gc_collect_cycles();
                 }
             }
             $params['iOffset'] = null;
             $impressionStats = $this->_apiClient->getImpressionStats($params);
             if (count($impressionStats->getImpressionStatsReturn) > 0) {
                 $groupMap = self::groupOverview($groupMap, Oara_Utilities::soapConverter($impressionStats->getImpressionStatsReturn, $this->_impressionConverterConfiguration));
                 $iteration = self::calculeIterationNumber($impressionStats->getImpressionStatsCountReturn->iRowsAvailable, $this->_pageSize);
                 unset($impressionStats);
                 for ($j = 1; $j < $iteration; $j++) {
                     $params['iOffset'] = $this->_pageSize * $j;
                     $impressionStats = $this->_apiClient->getImpressionStats($params);
                     $groupMap = self::groupOverview($groupMap, Oara_Utilities::soapConverter($impressionStats->getImpressionStatsReturn, $this->_impressionConverterConfiguration));
                     unset($impressionStats);
                     gc_collect_cycles();
                 }
             }
             $transactionDateArray = array();
             foreach ($transactionList as $merchantId => $data) {
                 $transactionDateArray = array_merge($transactionDateArray, Oara_Utilities::getDayFromArray($merchantId, $transactionList, $auxStartDate));
             }
             if (count($transactionDateArray) > 0) {
                 $groupMap = self::groupOverview($groupMap, $transactionDateArray);
             }
             foreach ($groupMap as $merchant => $overview) {
                 $overview['merchantId'] = $merchant;
                 $overview['date'] = $auxStartDate->toString("yyyy-MM-dd HH:mm:ss");
                 if (Oara_Utilities::checkRegister($overview)) {
                     $totalOverview[] = $overview;
                 }
             }
//.........这里部分代码省略.........
开发者ID:robryanx,项目名称:php-oara,代码行数:101,代码来源:AffiliateWindow.php

示例5: getTransactionList

 /**
  * (non-PHPdoc)
  * @see library/Oara/Network/Oara_Network_Base#getTransactionList($merchantId,$dStartDate,$dEndDate)
  */
 public function getTransactionList($merchantList = null, Zend_Date $dStartDate = null, Zend_Date $dEndDate = null)
 {
     $totalTransactions = array();
     $dStartDate = clone $dStartDate;
     $dStartDate->setHour("00");
     $dStartDate->setMinute("00");
     $dStartDate->setSecond("00");
     $dEndDate = clone $dEndDate;
     $dEndDate->setHour("23");
     $dEndDate->setMinute("59");
     $dEndDate->setSecond("59");
     //Set the webservice
     $publisherStatisticsServiceUrl = 'https://api.affili.net/V2.0/PublisherStatistics.svc?wsdl';
     $publisherStatisticsService = new Oara_Import_Soap_Client($publisherStatisticsServiceUrl, array('compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | SOAP_COMPRESSION_DEFLATE, 'soap_version' => SOAP_1_1));
     $iterationNumber = self::calculeIterationNumber(count($merchantList), 100);
     for ($currentIteration = 0; $currentIteration < $iterationNumber; $currentIteration++) {
         $merchantListSlice = array_slice($merchantList, 100 * $currentIteration, 100);
         $merchantListAux = array();
         foreach ($merchantListSlice as $merchant) {
             $merchantListAux[] = (string) $merchant;
         }
         //Call the function
         $params = array('StartDate' => strtotime($dStartDate->toString("yyyy-MM-dd")), 'EndDate' => strtotime($dEndDate->toString("yyyy-MM-dd")), 'TransactionStatus' => 'All', 'ProgramIds' => $merchantListAux, 'SubId' => '', 'ProgramTypes' => 'All', 'MaximumRecords' => '0', 'ValuationType' => 'DateOfRegistration');
         $transactionList = self::affilinetCall('transaction', $publisherStatisticsService, $params);
         if (isset($transactionList->SalesLeadsStatisticsRecords->SalesLeadsStatisticsRecords->SalesLeadsStatisticsRecord) && !is_array($transactionList->SalesLeadsStatisticsRecords->SalesLeadsStatisticsRecords->SalesLeadsStatisticsRecord)) {
             $transactionList->SalesLeadsStatisticsRecords->SalesLeadsStatisticsRecords->SalesLeadsStatisticsRecord = array($transactionList->SalesLeadsStatisticsRecords->SalesLeadsStatisticsRecords->SalesLeadsStatisticsRecord);
         }
         if (isset($transactionList->SalesLeadsStatisticsRecords->SalesLeadsStatisticsRecords->SalesLeadsStatisticsRecord)) {
             $transactionList = Oara_Utilities::soapConverter($transactionList->SalesLeadsStatisticsRecords->SalesLeadsStatisticsRecords->SalesLeadsStatisticsRecord, $this->_transactionConverterConfiguration);
             foreach ($transactionList as $transaction) {
                 //$transaction['merchantId'] = 3901;
                 if ($transaction['status'] == 'Confirmed') {
                     $transaction['status'] = Oara_Utilities::STATUS_CONFIRMED;
                 } else {
                     if ($transaction['status'] == 'Open') {
                         $transaction['status'] = Oara_Utilities::STATUS_PENDING;
                     } else {
                         if ($transaction['status'] == 'Cancelled') {
                             $transaction['status'] = Oara_Utilities::STATUS_DECLINED;
                         }
                     }
                 }
                 $totalTransactions[] = $transaction;
             }
         }
     }
     return $totalTransactions;
 }
开发者ID:robryanx,项目名称:php-oara,代码行数:52,代码来源:AffiliNet.php

示例6: getMerchantList

 /**
  * (non-PHPdoc)
  * @see library/Oara/Network/Oara_Network_Base#getMerchantList()
  */
 public function getMerchantList($merchantMap = array())
 {
     $this->_advertisersCampaings = array();
     $merchantsImport = $this->_apiClient->GetCampaigns($this->_exportMerchantParameters);
     if (!isset($merchantsImport->campaigns) || !isset($merchantsImport->campaigns->campaign)) {
         sleep(60);
         throw new Exception('Error advertisers not found');
     }
     $this->merchantList = Oara_Utilities::soapConverter($merchantsImport->campaigns->campaign, $this->_merchantConverterConfiguration);
     foreach ($merchantsImport->campaigns->campaign as $campaing) {
         if (!isset($this->_advertisersCampaings[$campaing->advertiserid])) {
             $this->_advertisersCampaings[$campaing->advertiserid] = $campaing->campaignid;
         } else {
             $this->_advertisersCampaings[$campaing->advertiserid] .= ',' . $campaing->campaignid;
         }
     }
     return $this->merchantList;
 }
开发者ID:robryanx,项目名称:php-oara,代码行数:22,代码来源:Dgm.php

示例7: getMerchantList

 /**
  * (non-PHPdoc)
  * @see library/Oara/Network/Oara_Network_Publisher_Base#getMerchantList()
  */
 public function getMerchantList()
 {
     $merchantList = array();
     foreach ($this->_campaignMap as $campaignKey => $campaignValue) {
         $merchants = $this->_soapClient->getProgramsWithMembershipStatus($this->_exportMerchantParameters['username'], $this->_exportMerchantParameters['password'], $campaignKey);
         foreach ($merchants as $merchant) {
             if ($merchant->programMembershipStatusName == 'Live' || $merchant->programMembershipStatusName == 'Joined') {
                 $merchantList[$merchant->programID] = $merchant;
             }
         }
     }
     $merchantList = Oara_Utilities::soapConverter($merchantList, $this->_merchantConverterConfiguration);
     return $merchantList;
 }
开发者ID:garygarside,项目名称:php-oara,代码行数:18,代码来源:WebGains.php


注:本文中的Oara_Utilities::soapConverter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。