当前位置: 首页>>代码示例>>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;未经允许,请勿转载。