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


PHP unknown_type::getOptions方法代码示例

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


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

示例1: init

 /**
  * 初始化
  */
 public function init()
 {
     $this->_bootstrap = $this->getInvokeArg('bootstrap');
     $this->_multidb = $this->_bootstrap->getResource('multidb');
     $this->_options = $this->_bootstrap->getOptions();
     $this->_helper->viewRenderer->view->setBasePath(APPLICATION_PATH . '/modules/foreign/views');
     $this->_helper->viewRenderer->setViewScriptPathSpec(':module#:controller#:action.:suffix');
     $this->_tsId = $this->_request->getParam('ts');
     $tuduId = $this->_request->getParam('tid');
     $unId = $this->_request->getParam('fid');
     if (!$this->_tsId || !$tuduId || !$unId) {
         $this->getResponse()->setHttpResponseCode(404);
         $this->getResponse()->sendResponse();
         return;
     }
     Tudu_Dao_Manager::setDbs(array(Tudu_Dao_Manager::DB_TS => $this->getTsDb($this->_tsId)));
     $this->_manager = Tudu_Tudu_Manager::getInstance();
     $this->_deliver = new Tudu_Deliver($this->getTsDb($this->_tsId));
     $this->_tudu = $this->_manager->getTuduById($tuduId, $unId);
     $this->_user = $this->_manager->getUser($tuduId, $unId);
     if (null !== $this->_user) {
         // 用户请求语言
         $language = $this->_request->getHeader('ACCEPT_LANGUAGE');
         if (strpos($language, 'zh') !== false) {
             if (strpos($language, 'hk') !== false || strpos($language, 'tw') !== false) {
                 $language = 'zh_TW';
             } else {
                 $language = 'zh_CN';
             }
         } else {
             $language = 'en_US';
         }
         $this->_user['option'] = array('language' => $language);
         if (null !== $this->_tudu) {
             $this->_session = new Zend_Session_Namespace(self::SESSION_NAMESPACE, true);
             $this->_sessionId = Zend_Session::getId();
             //
             /*if (isset($this->_session->foreign['uniqueid']) && $this->_session->foreign['uniqueid'] != $this->_user['uniqueid']) {
                   $this->_destroySession();
               }*/
             $this->_session->foreign['uniqueid'] = $this->_user['uniqueid'];
             $this->_session->foreign['address'] = $this->_user['email'] ? $this->_user['email'] : $this->_user['uniqueid'];
             $this->_session->foreign['truename'] = $this->_user['truename'];
             $this->_session->foreign['logintime'] = time();
             $this->_session->foreign['orgid'] = $this->_tudu->orgId;
             $this->_session->foreign['tsid'] = $this->_tsId;
             $this->_session->foreign['lasttime'] = time();
             if (empty($this->_session->auth)) {
                 $this->_session->auth = array('uniqueid' => $this->_user['uniqueid'], 'address' => $this->_session->foreign['address'], 'logintime' => $this->_session->foreign['logintime']);
             }
         }
         $this->_timestamp = time();
         $this->view->options = $this->_options;
         $this->view->tsid = $this->_tsId;
         $this->view->user = $this->_user;
     }
 }
开发者ID:bjtenao,项目名称:tudu-web,代码行数:60,代码来源:Foreign.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();
     /**/
     $dStartDate = new Zend_Date('2014-08-05', 'yyyy-MM-dd');
     $dEndDate = new Zend_Date('2014-08-05', 'yyyy-MM-dd');
     /**/
     $options = $this->_client->getOptions();
     $options[CURLOPT_ENCODING] = "gzip,deflate";
     $options[CURLOPT_HTTPHEADER] = array('Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Language: es,en-us;q=0.7,en;q=0.3', 'Accept-Encoding: gzip, deflate', 'Connection: keep-alive');
     $this->_client->setOptions($options);
     $urls = array();
     $urls[] = new Oara_Curl_Request("https://advertiser.zanox.com/advertisertransactionconfirmation/main/app?dest=sales&program=7641", array());
     $exportReport = $this->_client->get($urls);
     $timestampStartDate = strtotime($dStartDate->toString("dd-MM-yyyy"));
     //'05-08-2014'
     $timestampEndDate = strtotime($dEndDate->toString("dd-MM-yyyy"));
     $timestampStartDate = $timestampStartDate - 3600;
     $timestampStartDate = $timestampStartDate . '000';
     $timestampEndDate = $timestampEndDate - 3600;
     $timestampEndDate = $timestampEndDate . '000';
     $valuesFromExport = array();
     $valuesFromExport[] = new Oara_Curl_Parameter('transaction_type', 'SALE');
     $valuesFromExport[] = new Oara_Curl_Parameter('approved', 'true');
     $valuesFromExport[] = new Oara_Curl_Parameter('rejected', 'true');
     $valuesFromExport[] = new Oara_Curl_Parameter('open', 'true');
     $valuesFromExport[] = new Oara_Curl_Parameter('invalid', 'true');
     $valuesFromExport[] = new Oara_Curl_Parameter('confirmed', 'true');
     $valuesFromExport[] = new Oara_Curl_Parameter('date_from', $timestampStartDate);
     //1407193200000 ==> "1407196800 - 3600" ++ "000"
     $valuesFromExport[] = new Oara_Curl_Parameter('date_to', $timestampEndDate);
     $valuesFromExport[] = new Oara_Curl_Parameter('sale_date', 'true');
     $valuesFromExport[] = new Oara_Curl_Parameter('pattern', '');
     $valuesFromExport[] = new Oara_Curl_Parameter('pattern_field', 'ORDER_ID');
     $valuesFromExport[] = new Oara_Curl_Parameter('sort_column', 'SALE_DATE');
     $valuesFromExport[] = new Oara_Curl_Parameter('sort_direction', 'DESC');
     $valuesFromExport[] = new Oara_Curl_Parameter('tracking_category', '');
     $valuesFromExport[] = new Oara_Curl_Parameter('program_id', $this->_idProgram);
     $valuesFromExport[] = new Oara_Curl_Parameter('locale_name', 'en_US');
     $urls = array();
     $urls[] = new Oara_Curl_Request('https://advertiser.zanox.com/advertisertransactionconfirmation/main/export?', $valuesFromExport);
     $result = $this->_client->get($urls);
     echo $result[0];
     $exportData = str_getcsv($result[0], ";");
     /**/
     $exportData = null;
     $folder = realpath(dirname(COOKIES_BASE_DIR)) . '/pdf/';
     $my_file = $folder . 'tracking_pps_report.csv';
     $csvfile = fopen($my_file, 'rb');
     while (!feof($csvfile)) {
         $exportData[] = fgetcsv($csvfile, 1000, ";");
     }
     /**/
     for ($j = 1; $j < count($exportData) - 5; $j++) {
         if ($exportData[$j][2] == null) {
             throw new Exception('Order ID is null');
         } else {
             $transaction = array();
             $transaction['custom_id'] = $exportData[$j][4];
             $transaction['unique_id'] = $exportData[$j][2];
             $transaction['merchantId'] = $this->_idProgram;
             $transactionDate = new Zend_Date($exportData[$j][12], 'dd/MM/yy HH:mm CEST');
             $transaction['date'] = $transactionDate->toString("yyyy-MM-dd HH:mm:ss");
             $transaction['amount'] = $exportData[$j][7];
             $transaction['commission'] = $exportData[$j][8];
             if ($exportData[$j][0] == 'Confirmed') {
                 $transaction['status'] = Oara_Utilities::STATUS_CONFIRMED;
             } else {
                 if ($exportData[$j][0] == 'Open') {
                     $transaction['status'] = Oara_Utilities::STATUS_PENDING;
                 } else {
                     if ($exportData[$j][0] == 'Rejected') {
                         $transaction['status'] = Oara_Utilities::STATUS_DECLINED;
                     }
                 }
             }
             $totalTransactions[] = $transaction;
         }
     }
     return $totalTransactions;
 }
开发者ID:garygarside,项目名称:php-oara,代码行数:85,代码来源:Zanox.php

示例3: smwfAAMBeforeStrip

/**
 * This function is called from the parser, before <nowiki> parts have been
 * removed and before templates etc are expanded.
 *
 * @param unknown_type $parser
 * @param unknown_type $text
 * @param unknown_type $strip_stat
 */
function smwfAAMBeforeStrip(&$parser, &$text, &$strip_stat)
{
    $popts = $parser->getOptions();
    if (method_exists($popts, "getParsingContext")) {
        if ($popts->getParsingContext() != "Main article") {
            return true;
        }
    }
    global $smwgDisableAAMParser;
    if ($smwgDisableAAMParser) {
        return true;
    }
    global $smwgHaloIP, $smwgHaloAAMParser;
    require_once "{$smwgHaloIP}/includes/SMW_AAMParser.php";
    if ($smwgHaloAAMParser == null) {
        $smwgHaloAAMParser = new SMWH_AAMParser($text);
    }
    $parser->mOptions->setEditSection(false);
    $text = $smwgHaloAAMParser->addWikiTextOffsets($text);
    return true;
}
开发者ID:seedbank,项目名称:old-repo,代码行数:29,代码来源:SMW_Initialize.php


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