當前位置: 首頁>>代碼示例>>PHP>>正文


PHP owa_coreAPI::singleton方法代碼示例

本文整理匯總了PHP中owa_coreAPI::singleton方法的典型用法代碼示例。如果您正苦於以下問題:PHP owa_coreAPI::singleton方法的具體用法?PHP owa_coreAPI::singleton怎麽用?PHP owa_coreAPI::singleton使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在owa_coreAPI的用法示例。


在下文中一共展示了owa_coreAPI::singleton方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: action

 function action()
 {
     // Load the core API
     $api =& owa_coreAPI::singleton($this->params);
     if ($this->params['site_id']) {
         //get site labels
         $s = owa_coreAPI::entityFactory('base.site');
         $s->getByColumn('site_id', $this->getParam('site_id'));
         $this->set('site_name', $s->get('name'));
         $this->set('site_description', $s->get('description'));
     } else {
         $this->set('site_name', 'All Sites');
         $this->set('site_description', 'All Sites Tracked by OWA');
     }
     //setup Metrics
     $m = owa_coreApi::metricFactory('base.latestVisits');
     $m->setConstraint('site_id', $this->getParam('site_id'));
     $m->setPeriod($this->getPeriod());
     $m->setOrder(OWA_SQL_DESCENDING);
     $m->setLimit(15);
     $results = $m->generate();
     $this->set('latest_visits', $results);
     $this->setView('base.kmlVisitsGeolocation');
     return;
 }
開發者ID:nishantmendiratta,項目名稱:Open-Web-Analytics,代碼行數:25,代碼來源:kmlVisitsGeolocation.php

示例2: render

 function render($data)
 {
     //page title
     $this->t->set('page_title', 'OWA Options');
     // load body template
     $this->body->set_template('options.tpl');
     // fetch admin links from all modules
     // need api call here.
     $this->body->set('headline', 'OWA Settings');
     // get admin panels
     $api = owa_coreAPI::singleton();
     $panels = $api->getAdminPanels();
     //print_r($panels);
     $this->body->set('panels', $panels);
     // Assign config data
     $this->body->set('config', $this->config);
     $this->setJs('jquery', 'base/js/includes/jquery/jquery-1.6.4.min.js', '1.6.4');
     $this->setJs("sprintf", "base/js/includes/jquery/jquery.sprintf.js", '', array('jquery'));
     // needed anymore?
     $this->setJs("jquery-ui", "base/js/includes/jquery/jquery-ui-1.8.12.custom.min.js", '1.8.12', array('jquery'));
     $this->setJs("owa", "base/js/owa.js");
     $this->setCss('base/css/owa.admin.css');
 }
開發者ID:ashutoshdev,項目名稱:Open-Web-Analytics,代碼行數:23,代碼來源:options.php

示例3: action

 function action()
 {
     // Load the core API
     $api =& owa_coreAPI::singleton($this->params);
     $data = array();
     $data['params'] = $this->params;
     if ($this->params['site_id']) {
         //get site labels
         $s = owa_coreAPI::entityFactory('base.site');
         $s->getByColumn('site_id', $this->params['site_id']);
         $data['site_name'] = $s->get('name');
         $data['site_description'] = $s->get('description');
         $data['site_domain'] = $s->get('domain');
     } else {
         $data['site_name'] = 'All Sites';
         $data['site_description'] = 'Visits for all sitess tracked by OWA.';
         $data['site_domain'] = 'owa';
     }
     $data['view'] = 'base.kmlVisitsGeolocationNetworkLink';
     $data['user_name'] = $this->params['u'];
     $data['passkey'] = $this->params['pk'];
     return $data;
 }
開發者ID:nishantmendiratta,項目名稱:Open-Web-Analytics,代碼行數:23,代碼來源:kmlVisitsGeolocationNetworkLink.php


注:本文中的owa_coreAPI::singleton方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。