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


PHP owa_coreAPI::getRequestParam方法代码示例

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


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

示例1: __construct

 function __construct($params)
 {
     if (array_key_exists('goal_number', $params)) {
         $goal_number = $params['goal_number'];
     }
     $siteId = owa_coreAPI::getRequestParam('siteId');
     if ($siteId) {
         $gm = owa_coreAPI::getGoalManager($siteId);
         $goal = $gm->getGoal($goal_number);
         $this->setLabel("G{$goal_number} Value");
     } else {
         $this->setLabel("G{$goal_number} Value");
     }
     $name = 'goal' . $goal_number . 'Value';
     $this->setName($name);
     $this->setEntity('base.session');
     $column = 'goal_' . $goal_number . '_value';
     $this->setColumn($column);
     $this->setSelect(sprintf("SUM(%s)", $this->getColumn()));
     $this->setDataType('currency');
     return parent::__construct();
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:22,代码来源:goalNValue.php

示例2: __construct

 function __construct($params)
 {
     if (array_key_exists('goal_number', $params)) {
         $goal_number = $params['goal_number'];
     }
     $name = 'goal' . $goal_number . 'Completions';
     $this->setName($name);
     $siteId = owa_coreAPI::getRequestParam('siteId');
     if ($siteId) {
         $gm = owa_coreAPI::getGoalManager($siteId);
         $goal = $gm->getGoal($goal_number);
         $this->setLabel(sprintf('G%d: %s', $goal_number, $goal['goal_name']));
     } else {
         $this->setLabel(sprintf('Goal %d Completions', $goal_number));
     }
     $this->setEntity('base.session');
     $column = 'goal_' . $goal_number;
     $this->setColumn($column);
     $this->setSelect(sprintf("SUM(%s)", $this->getColumn()));
     $this->setDataType('integer');
     return parent::__construct();
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:22,代码来源:goalNCompletions.php

示例3: define

/**
 * Install Page Wrapper Script
 * 
 * @author      Peter Adams <peter@openwebanalytics.com>
 * @copyright   Copyright &copy; 2006 Peter Adams <peter@openwebanalytics.com>
 * @license     http://www.gnu.org/copyleft/gpl.html GPL v2.0
 * @category    owa
 * @package     owa
 * @version		$Revision$	      
 * @since		owa 1.0.0
 */
// Initialize owa
//define('OWA_ERROR_HANDLER', 'development');
define('OWA_CACHE_OBJECTS', false);
define('OWA_INSTALLING', true);
$owa = new owa_php();
if ($owa->isEndpointEnabled(basename(__FILE__))) {
    // need third param here so that seting is not persisted.
    $owa->setSetting('base', 'main_url', 'install.php');
    // run controller, echo page content
    $do = owa_coreAPI::getRequestParam('do');
    $params = array();
    if (empty($do)) {
        $params['do'] = 'base.installStart';
    }
    // run controller or view and echo page content
    echo $owa->handleRequest($params);
} else {
    // unload owa
    $owa->restInPeace();
}
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:31,代码来源:install.php

示例4: handleRequest

 /**
  * Handles OWA internal page/action requests
  *
  * @return unknown
  */
 public static function handleRequest($caller_params = null, $action = '')
 {
     static $init;
     $service = owa_coreAPI::serviceSingleton();
     // Override request parsms with those passed by caller
     if (!empty($caller_params)) {
         $service->request->mergeParams($caller_params);
     }
     $params = $service->request->getAllOwaParams();
     if ($init != true) {
         owa_coreAPI::debug('Handling request with params: ' . print_r($params, true));
     }
     // backwards compatability with old style view/controler scheme
     // still needed??
     if (array_key_exists('view', $params)) {
         // its a view request so the only data is in whats in the params
         $init = true;
         return owa_coreAPI::displayView($params);
     }
     if (empty($action)) {
         $action = owa_coreAPI::getRequestParam('action');
         if (empty($action)) {
             $action = owa_coreAPI::getRequestParam('do');
             if (empty($action)) {
                 $action = owa_coreAPI::getSetting('base', 'start_page');
                 $params['do'] = $action;
             }
         }
     }
     $init = true;
     owa_coreAPI::debug('About to perform action: ' . $action);
     return owa_coreAPI::performAction($action, $params);
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:38,代码来源:owa_coreAPI.php

示例5: getDomstream

 function getDomstream($domstream_guid)
 {
     if (!$domstream_guid) {
         return;
     }
     // Fetch document object
     $d = owa_coreAPI::entityFactory('base.domstream');
     //$d->load($this->getParam('domstream_id'));
     //$json = new Services_JSON();
     //$d->set('events', $json->decode($d->get('events')));
     $db = owa_coreAPI::dbSingleton();
     $db->select('*');
     $db->from($d->getTableName());
     $db->where('domstream_guid', $domstream_guid);
     $db->orderBy('timestamp', 'ASC');
     $ret = $db->getAllRows();
     //print_r($ret);
     $combined = '';
     foreach ($ret as $row) {
         $combined = $this->mergeStreamEvents($row['events'], $combined);
     }
     $row['events'] = json_decode($combined);
     $t = new owa_template();
     $t->set_template('json.php');
     //$json = new Services_JSON();
     // set
     // if not found look on the request scope.
     $callback = owa_coreAPI::getRequestParam('jsonpCallback');
     if (!$callback) {
         $t->set('json', json_encode($row));
     } else {
         $body = sprintf("%s(%s);", $callback, json_encode($row));
         $t->set('json', $body);
     }
     return $t->fetch();
 }
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:36,代码来源:module.php

示例6: render

 function render()
 {
     // load template
     $this->t->set_template('wrapper_blank.tpl');
     $this->body->set_template('json.php');
     $json = new Services_JSON();
     // set
     // look for jsonp callback
     $callback = $this->get('jsonpCallback');
     // if not found look on the request scope.
     if (!$callback) {
         $callback = owa_coreAPI::getRequestParam('jsonpCallback');
     }
     if ($callback) {
         $body = sprintf("%s(%s);", $callback, $json->encode($this->get('json')));
     } else {
         $body = $json->encode($this->get('json'));
     }
     $this->body->set('json', $body);
 }
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:20,代码来源:owa_view.php

示例7: placeHelperPageTags

 /**
  * Returns a configured javascript tracker for inclusion in your web page.
  * You can pass an options array to control what the tracker will log.
  * The options array is a key/value pair format like:
  *
  * $options = array('do_not_log_pageview' => true);
  *
  * Option keys include: 'do_not_log_pageview', 'do_not_log_clicks', 'do_not_log_domstream'
  *
  * @param 	$echo		bool 	if true the function will echo. if false the tracker is returned asa string.
  * @param	$options	array	an key value pair option array 
  * @return 	$tag 		string	the tracker javascript.
  */
 function placeHelperPageTags($echo = true, $options = array())
 {
     if (!owa_coreAPI::getRequestParam('is_robot')) {
         // check to see if first hit tag is needed
         if (isset($options['delay_first_hit']) || owa_coreAPI::getSetting('base', 'delay_first_hit')) {
             $service =& owa_coreAPI::serviceSingleton();
             //check for persistant cookie
             $v = $service->request->getOwaCookie('v');
             if (empty($v)) {
                 $options['first_hit_tag'] = true;
             }
         }
         if (!class_exists('owa_template')) {
             require_once OWA_BASE_CLASSES_DIR . 'owa_template.php';
         }
         $t = new owa_template();
         $t->set_template('js_helper_tags.tpl');
         $tracking_code = owa_coreAPI::getJsTrackerTag($this->getSiteId(), $options);
         $t->set('tracking_code', $tracking_code);
         $tag = $t->fetch();
         if ($echo == false) {
             return $tag;
         } else {
             echo $tag;
         }
     }
 }
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:40,代码来源:owa_caller.php

示例8: getCampaignProperties

 function getCampaignProperties($event)
 {
     $campaign_params = owa_coreAPI::getSetting('base', 'campaign_params');
     $campaign_properties = array();
     $campaign_state = array();
     foreach ($campaign_params as $k => $param) {
         //look for property on the event
         $property = $event->get($param);
         // look for property on the request scope.
         if (!$property) {
             $property = owa_coreAPI::getRequestParam($param);
         }
         if ($property) {
             $campaign_properties[$k] = $property;
         }
     }
     // backfill values for incomplete param combos
     if (array_key_exists('at', $campaign_properties) && !array_key_exists('ad', $campaign_properties)) {
         $campaign_properties['ad'] = '(not set)';
     }
     if (array_key_exists('ad', $campaign_properties) && !array_key_exists('at', $campaign_properties)) {
         $campaign_properties['at'] = '(not set)';
     }
     if (!empty($campaign_properties)) {
         //$campaign_properties['ts'] = $event->get('timestamp');
     }
     owa_coreAPI::debug('campaign properties: ' . print_r($campaign_properties, true));
     return $campaign_properties;
 }
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:29,代码来源:client.php

示例9: ignore_user_abort

ignore_user_abort(true);
set_time_limit(180);
include_once 'owa_env.php';
require_once OWA_BASE_DIR . '/owa_php.php';
/**
 * Remote Event Queue Endpoint
 * 
 * @author      Peter Adams <peter@openwebanalytics.com>
 * @copyright   Copyright &copy; 2006 Peter Adams <peter@openwebanalytics.com>
 * @license     http://www.gnu.org/copyleft/gpl.html GPL v2.0
 * @category    owa
 * @package     owa
 * @version		$Revision$	      
 * @since		owa 1.3.0
 */
$owa = new owa_php();
if ($owa->isEndpointEnabled(basename(__FILE__))) {
    $owa->setSetting('base', 'is_remote_event_queue', true);
    $owa->e->debug('post: ' . print_r($_POST, true));
    $raw_event = owa_coreAPI::getRequestParam('event');
    if ($raw_event) {
        $dispatch = owa_coreAPI::getEventDispatch();
        $event = $dispatch->makeEvent();
        $event->loadFromArray($raw_event);
        $owa->e->debug(print_r($event, true));
        $dispatch->asyncNotify($event);
    }
} else {
    // unload owa
    $owa->restInPeace();
}
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:31,代码来源:queue.php

示例10: execute

 function execute()
 {
     global $wgRequest, $wgOut, $wgUser, $wgSitename, $wgScriptPath, $wgScript, $wgServer, $wgDBtype, $wgDBname, $wgDBserver, $wgDBuser, $wgDBpassword;
     //must be called after setHeaders for some reason or elsethe wgUser object is not yet populated.
     $this->setHeaders();
     if ($this->userCanExecute($wgUser)) {
         $owa = owa_singleton();
         $params = array();
         // if no action is found...
         $do = owa_coreAPI::getRequestParam('do');
         if (empty($do)) {
             // check to see that owa in installed.
             if (!$owa->getSetting('base', 'install_complete')) {
                 define('OWA_INSTALLING', true);
                 $site_url = $wgServer . $wgScriptPath;
                 $params = array('site_id' => md5($site_url), 'name' => $wgSitename, 'domain' => $site_url, 'description' => '', 'do' => 'base.installStartEmbedded');
                 $params['db_type'] = $wgDBtype;
                 $params['db_name'] = $wgDBname;
                 $params['db_host'] = $wgDBserver;
                 $params['db_user'] = $wgDBuser;
                 $params['db_password'] = $wgDBpassword;
                 $params['public_url'] = $wgServer . $wgScriptPath . '/extensions/owa/';
                 $page = $owa->handleRequest($params);
                 // send to daashboard
             } else {
                 //$params['do'] = 'base.reportDashboard';
                 $page = $owa->handleRequest($params);
             }
             // do action found on url
         } else {
             $page = $owa->handleRequestFromURL();
         }
         return $wgOut->addHTML($page);
     } else {
         $this->displayRestrictionError();
     }
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:37,代码来源:mw_plugin.php

示例11: authenticateUser

 /**
  * Used by controllers to check if the user exists and if they are priviledged.
  *
  * @param string $necessary_role
  */
 function authenticateUser()
 {
     // check existing auth status first in case someone else took care of this already.
     if (owa_coreAPI::getCurrentUser()->isAuthenticated()) {
         $ret = true;
     } elseif (owa_coreAPI::getRequestParam('apiKey')) {
         // auth user by api key
         $ret = $this->authByApiKey(owa_coreAPI::getRequestParam('apiKey'));
     } elseif (owa_coreAPI::getRequestParam('pk') && owa_coreAPI::getStateParam('u')) {
         // auth user by temporary passkey. used in forgot password situations
         $ret = $this->authenticateUserByUrlPasskey(owa_coreAPI::getRequestParam('pk'));
     } elseif (owa_coreAPI::getRequestParam('user_id') && owa_coreAPI::getRequestParam('password')) {
         // auth user by login form input
         $ret = $this->authByInput(owa_coreAPI::getRequestParam('user_id'), owa_coreAPI::getRequestParam('password'));
     } elseif (owa_coreAPI::getStateParam('u') && owa_coreAPI::getStateParam('p')) {
         // auth user by cookies
         $ret = $this->authByCookies(owa_coreAPI::getStateParam('u'), owa_coreAPI::getStateParam('p'));
         // bump expiration time
         //owa_coreAPI::setState('p', '', owa_coreAPI::getStateParam('p'));
     } else {
         $ret = false;
         owa_coreAPI::debug("Could not find any credentials to authenticate with.");
     }
     // filter results for modules can add their own auth logic.
     $ret = $this->eq->filter('auth_status', $ret);
     return array('auth_status' => $ret);
 }
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:32,代码来源:owa_auth.php

示例12: trackEvent

 /**
  * Logs tracking event
  * 
  * This function fires a tracking event that will be processed and then dispatched
  *
  * @param object $event
  * @return boolean
  */
 public function trackEvent($event)
 {
     // do not track anything if user is in overlay mode
     if (owa_coreAPI::getStateParam('overlay')) {
         return false;
     }
     $this->setGlobalEventProperty('HTTP_REFERER', owa_coreAPI::getServerParam('HTTP_REFERER'));
     // needed by helper page tags function so it can append to first hit tag url
     if (!$this->getSiteId()) {
         $this->setSiteId($event->get('site_id'));
     }
     if (!$this->getSiteId()) {
         $this->setSiteId(owa_coreAPI::getRequestParam('site_id'));
     }
     // set various state properties.
     $this->manageState($event);
     $event = $this->setAllGlobalEventProperties($event);
     // send event to log API for processing.
     return owa_coreAPI::logEvent($event->getEventType(), $event);
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:28,代码来源:client.php

示例13: owa_pageController

function owa_pageController()
{
    $owa = owa_getInstance();
    $do = owa_coreAPI::getRequestParam('do');
    $params = array();
    if (empty($do)) {
        $params['do'] = 'base.reportDashboard';
    }
    echo $owa->handleRequest($params);
}
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:10,代码来源:wp_plugin.php

示例14: resultSetToJsonp

 function resultSetToJsonp($callback = '')
 {
     // if not found look on the request scope.
     if (!$callback) {
         $callback = owa_coreAPI::getRequestParam('jsonpCallback');
     }
     if (!$callback) {
         return $this->resultSetToJson();
     }
     $t = new owa_template();
     $t->set_template('json.php');
     // set
     $body = sprintf("%s(%s);", $callback, json_encode($this));
     $t->set('json', $body);
     return $t->fetch();
 }
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:16,代码来源:paginatedResultSet.php


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