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


PHP owa_coreAPI::executeApiCommand方法代码示例

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


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

示例1: action

 function action()
 {
     $document_id = '';
     // get period
     $p = $this->getPeriod();
     // check for limits
     if ($this->getParam('document_id') || $this->getParam('pageUrl') || $this->getParam('pagePath')) {
         $doc = owa_coreAPI::entityFactory('base.document');
         if ($this->getParam('pageUrl')) {
             $doc->getByColumn('url', $this->getParam('pageUrl'));
         } elseif ($this->getParam('pagePath')) {
             $doc->getByColumn('uri', $this->getParam('pagePath'));
         } else {
             $doc->load($this->getParam('document_id'));
         }
         $document_id = $doc->get('id');
         $this->setTitle('Domstream Recordings: ', $doc->get('url'));
         $this->set('document', $doc->_getProperties());
         $this->set('item_properties', $doc);
     } else {
         // latest domstream report
         $this->setTitle('Latest Domstreams');
     }
     $ds = owa_coreAPI::executeApiCommand(array('do' => 'getDomstreams', 'startDate' => $p->getStartDate()->getYyyymmdd(), 'endDate' => $p->getEndDate()->getYyyymmdd(), 'document_id' => $document_id, 'siteId' => $this->getParam('siteId'), 'page' => $this->getParam('page'), 'resultsPerPage' => 50, 'format' => $this->getParam('format')));
     $this->set('domstreams', $ds);
     //print_r($ds);
     // set view stuff
     $this->setSubview('base.reportDomstreams');
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:29,代码来源:reportDomstreams.php

示例2: action

 function action()
 {
     $s = owa_coreAPI::serviceSingleton();
     // lookup method class
     $do = $s->getApiMethodClass($this->getParam('do'));
     if ($do) {
         // check credentials
         /* PERFORM AUTHENTICATION */
         if (array_key_exists('required_capability', $do)) {
             /* CHECK USER FOR CAPABILITIES */
             if (!owa_coreAPI::isCurrentUserCapable($do['required_capability'])) {
                 // doesn't look like the currentuser has the necessary priviledges
                 owa_coreAPI::debug('User does not have capability required by this controller.');
                 // auth user
                 $auth =& owa_auth::get_instance();
                 $status = $auth->authenticateUser();
                 // if auth was not successful then return login view.
                 if ($status['auth_status'] != true) {
                     return 'This method requires authentication.';
                 } else {
                     //check for needed capability again now that they are authenticated
                     if (!owa_coreAPI::isCurrentUserCapable($do['required_capability'])) {
                         return 'Your user does not have privileges to access this method.';
                     }
                 }
             }
         }
         //perform
         $map = owa_coreAPI::getRequest()->getAllOwaParams();
         echo owa_coreAPI::executeApiCommand($map);
     }
 }
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:32,代码来源:apiRequest.php

示例3: action

 function action()
 {
     $rs = owa_coreAPI::executeApiCommand(array('do' => 'getLatestVisits', 'siteId' => $this->getParam('siteId'), 'page' => $this->getParam('page'), 'startDate' => $this->getParam('startDate'), 'endDate' => $this->getParam('endDate'), 'period' => $this->getParam('period'), 'resultsPerPage' => 10));
     $this->set('latest_visits', $rs);
     // view stuff
     $this->setView('base.report');
     $this->setSubview('base.reportVisitors');
     $this->setTitle('Visitors');
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:9,代码来源:reportVisitors.php

示例4: action

 function action()
 {
     $gm = owa_coreAPI::supportClassFactory('base', 'goalManager', $this->getParam('siteId'));
     $goal_number = $this->getParam('goalNumber');
     if (!$goal_number) {
         $goal_number = 1;
     }
     $goal = $gm->getGoal($goal_number);
     $funnel = $gm->getGoalFunnel($goal_number);
     if ($funnel) {
         $goal = $gm->getGoal($goal_number);
         // find required steps. build a constraint string.
         $required_step_constraints = '';
         $steps_count = count($funnel);
         for ($i = 1; $i <= $steps_count; $i++) {
             if (array_key_exists('is_required', $funnel[$i]) && $funnel[$i]['is_required'] === true) {
                 $required_step_constraints .= 'pagePath==' . $funnel[$i]['url'] . ',';
             }
         }
         $required_step_constraints = trim($required_step_constraints, ',');
         //print $required_step_constraints;
         // get total visits
         $total_visitors_rs = owa_coreAPI::executeApiCommand(array('period' => $this->get('period'), 'startDate' => $this->get('startDate'), 'endDate' => $this->get('endDate'), 'constraints' => $required_step_constraints, 'metrics' => 'visitors', 'do' => 'getResultSet', 'siteId' => $this->getParam('siteId')));
         //print_r($total_visitors_rs);
         $total_visitors = $total_visitors_rs->getAggregateMetric('visitors');
         //print "Total visits: $total_visitors";
         $this->set('total_visitors', $total_visitors);
         // get visits for each step
         // add goal url to steps array
         $funnel[] = array('url' => $goal['details']['goal_url'], 'name' => $goal['goal_name'], 'step_number' => $steps_count + 1);
         foreach ($funnel as $k => $step) {
             $operator = '==';
             $rs = owa_coreAPI::executeApiCommand(array('period' => $this->get('period'), 'startDate' => $this->get('startDate'), 'endDate' => $this->get('endDate'), 'metrics' => 'visitors', 'constraints' => 'pagePath' . $operator . $step['url'], 'do' => 'getResultSet', 'siteId' => $this->getParam('siteId')));
             $visitors = $rs->getAggregateMetric('visitors') ? $rs->getAggregateMetric('visitors') : 0;
             $funnel[$k]['visitors'] = $visitors;
             // backfill check in case there are more visitors to this step than were at prior step.
             if ($funnel[$k]['visitors'] <= $funnel[$k - 1]['visitors']) {
                 if ($funnel[$k - 1]['visitors'] > 0) {
                     $funnel[$k]['visitor_percentage'] = round($funnel[$k]['visitors'] / $funnel[$k - 1]['visitors'], 4) * 100 . '%';
                 } else {
                     $funnel[$k]['visitor_percentage'] = '0.00%';
                 }
             } else {
                 $funnel[$k]['visitor_percentage'] = '100%';
             }
         }
         //print_r($funnel);
         $goal_step = end($funnel);
         $goal_conversion_rate = round($goal_step['visitors'] / $total_visitors, 2) * 100 . '%';
         $this->set('goal_conversion_rate', $goal_conversion_rate);
         $this->set('funnel', $funnel);
     }
     // set view stuff
     $this->setSubview('base.reportGoalFunnel');
     $this->setTitle('Funnel Visualization:', 'Goal ' . $goal_number);
     $this->set('goal_number', $goal_number);
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:57,代码来源:reportGoalFunnel.php

示例5: action

 function action()
 {
     $visit = owa_coreAPI::executeApiCommand(array('do' => 'getVisitDetail', 'sessionId' => $this->getParam('session_id')));
     //setup Metrics
     $rs = owa_coreAPI::executeApiCommand(array('do' => 'getClickstream', 'sessionId' => $this->getParam('session_id')));
     $this->set('clickstream', $rs);
     $this->set('visit', $visit);
     $this->set('session_id', $this->getParam('session_id'));
     $this->setView('base.report');
     $this->setSubview('base.reportVisit');
     $this->setTitle('Visit Clickstream');
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:12,代码来源:reportVisit.php

示例6: action

 function action()
 {
     $site_id = $this->getParam('siteId');
     if ($site_id) {
         //get site labels
         $s = owa_coreAPI::entityFactory('base.site');
         $s->getByColumn('site_id', $site_id);
         $this->set('site_name', $s->get('name'));
         $this->set('site_description', $s->get('description'));
     }
     $rs = owa_coreAPI::executeApiCommand(array('do' => 'getLatestVisits', 'siteId' => $this->getParam('siteId'), 'page' => $this->getParam('page'), 'startDate' => $this->getParam('startDate'), 'endDate' => $this->getParam('endDate'), 'period' => $this->getParam('period'), 'resultsPerPage' => 200));
     $this->set('latest_visits', $rs);
     $this->set('site_id', $site_id);
     $this->setTitle('Visitor Geo-location');
     $this->setView('base.report');
     $this->setSubview('base.reportVisitsGeolocation');
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:17,代码来源:reportVisitsGeolocation.php

示例7: action

 function action()
 {
     // action counts
     $params = array('period' => $this->get('period'), 'startDate' => $this->get('startDate'), 'endDate' => $this->get('endDate'), 'metrics' => 'actions', 'dimensions' => 'actionName', 'siteId' => $this->getParam('siteId'), 'do' => 'getResultSet');
     $rs = owa_coreAPI::executeApiCommand($params);
     //print_r($rs);
     $this->set('actions', $rs);
     $rs = owa_coreAPI::executeApiCommand(array('do' => 'getLatestVisits', 'siteId' => $this->getParam('siteId'), 'page' => $this->getParam('page'), 'startDate' => $this->getParam('startDate'), 'endDate' => $this->getParam('endDate'), 'period' => $this->getParam('period'), 'resultsPerPage' => 10));
     $this->set('latest_visits', $rs);
     // set view stuff
     $this->setSubview('base.reportDashboard');
     $this->setTitle('Dashboard');
     $metrics = 'visits,uniqueVisitors,pageViews,bounceRate,pagesPerVisit,visitDuration';
     if (owa_coreAPI::getSiteSetting($this->getParam('siteId'), 'enableEcommerceReporting')) {
         $metrics .= ',transactions,transactionRevenue';
     }
     $this->set('metrics', $metrics);
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:18,代码来源:reportDashboard.php

示例8: action

 function action()
 {
     $visitorId = $this->getParam('visitorId');
     if (!$visitorId) {
         $visitorId = $this->getParam('visitor_id');
     }
     $v = owa_coreAPI::entityFactory('base.visitor');
     $v->load($visitorId);
     if ($this->getParam('date')) {
         $startDate = $this->getParam('date');
         $endDate = $this->getParam('date');
     }
     $rs = owa_coreAPI::executeApiCommand(array('do' => 'getLatestVisits', 'visitorId' => $visitorId, 'siteId' => $this->getParam('siteId'), 'page' => $this->getParam('page'), 'startDate' => $startDate, 'endDate' => $endDate, 'format' => ''));
     $this->set('visits', $rs);
     $this->set('visitor', $v);
     $this->set('visitor_id', $visitorId);
     $this->setView('base.report');
     $this->setSubview('base.reportVisits');
     $this->setTitle('Visit History For: ', $v->getVisitorName());
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:20,代码来源:reportVisits.php

示例9: action

 function action()
 {
     $visitorId = $this->getParam('visitorId');
     if (!$visitorId) {
         $visitorId = $this->getParam('visitor_id');
     }
     $v = owa_coreAPI::entityFactory('base.visitor');
     $v->load($visitorId);
     $lv = owa_coreAPI::executeApiCommand(array('do' => 'getLatestVisits', 'siteId' => $this->getParam('siteId'), 'page' => $this->getParam('page'), 'startDate' => $this->getParam('startDate'), 'endDate' => $this->getParam('endDate'), 'period' => $this->getParam('period'), 'visitorId' => $v->get('id'), 'resultsPerPage' => 10));
     $this->set('visits', $lv);
     $this->set('visitor_label', $v->getVisitorName());
     $first_visit_date = date('m/d/y', $v->get('first_session_timestamp'));
     $this->set('first_visit_date', $first_visit_date);
     $this->set('num_prior_visits', $v->get('num_prior_sessions'));
     $this->set('visitor_id', $visitorId);
     $this->set('visitor', $v);
     $this->set('visitor_avatar_id', $v->getAvatarId());
     $this->setView('base.report');
     $this->setSubview('base.reportVisitor');
     $this->setTitle('Visitor History');
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:21,代码来源:reportVisitor.php

示例10: action

 function action()
 {
     $map = owa_coreAPI::getRequest()->getAllOwaParams();
     echo owa_coreAPI::executeApiCommand($map);
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:5,代码来源:apiRequest.php

示例11: displayMetricInfobox

 function displayMetricInfobox($params = array())
 {
     $t = new owa_template();
     if (!empty($dom_id)) {
         $dom_id = rand();
     }
     $params['do'] = 'getResultSet';
     $count = owa_coreAPI::executeApiCommand($params);
     $params['period'] = 'last_thirty_days';
     $params['dimensions'] = 'date';
     $trend = owa_coreAPI::executeApiCommand($params);
     $t->set('metric_name', $params['metrics']);
     $t->set('dom_id', $dom_id);
     $t->set('count', $count);
     $t->set('trend', $trend);
     $t->set_template('metricInfobox.php');
     return $t->fetch();
 }
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:18,代码来源:owa_template.php

示例12: getLatestActions

 function getLatestActions($startDate, $endDate, $siteId, $visitorId = '', $sessionId = '', $width = '300px', $resultsPerPage = 25, $page = 1)
 {
     $la = owa_coreAPI::executeApiCommand(array('do' => 'getLatestActions', 'siteId' => $siteId, 'page' => $page, 'startDate' => $startDate, 'endDate' => $endDate, 'visitorId' => $visitorId, 'sessionId' => $sessionId, 'resultsPerPage' => $resultsPerPage));
     $items = $la->getResultsRows();
     $t = new owa_template();
     $t->set('items', $items);
     $t->set('width', $width);
     $t->set_template('widget_latestActions.php');
     return $t->fetch();
 }
开发者ID:arineng,项目名称:Open-Web-Analytics,代码行数:10,代码来源:owa_template.php


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