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


PHP DataModel::getContent方法代码示例

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


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

示例1: getPagesDetailsZoom

 function getPagesDetailsZoom($categoryAsked = '')
 {
     $this->objects['category'] = new ArchiveTable('category');
     $this->objects['page'] = new ArchiveTable('page');
     $this->objects['file'] = new ArchiveTable('file');
     $this->objects['vars_name'] = new ArchiveTable('vars_name');
     $this->objects['vars_value'] = new ArchiveTable('vars_value');
     $nbVis = $this->getContent('nb_vis');
     //		printDebug($all); exit;
     if ($this->archive->periodType === DB_ARCHIVES_PERIOD_DAY) {
         $nbLast = 15;
     } else {
         $nbLast = 3;
     }
     $archives = $this->getLastArchives($nbLast, 1, DATE_NORMAL);
     printTime('beg 1 of pages details');
     $i = 0;
     // load "pure" pages array
     foreach ($archives as $dateToDisplay => $archive) {
         printTime('foreach' . ++$i . ' of pages details');
         $o_data = new DataModel($archive, $this->request);
         $displayInfo[] = $dateToDisplay;
         printTime('before uz' . $i . ' of pages details');
         if (STORE_PAG_ARRAY_IN_FILE) {
             $file = INCLUDE_PATH . "/datas/archives/" . $o_data->infoSerialized['idarchives'] . ".dat";
             if (!is_readable($file)) {
                 saveConfigFile($file, unserialize($o_data->infoSerialized['vis_pag_grp']), 'visPagGrp');
             }
             if (is_readable($file)) {
                 $visPagGrp = array();
                 require_once $file;
                 $array = $visPagGrp;
             }
         } else {
             $visPagGrp = array();
             if (!is_null($o_data->infoSerialized['vis_pag_grp'])) {
                 $visPagGrp = $o_data->getContent('vis_pag_grp');
             }
         }
         //var_dump($visPagGrp);exit;
         $a_all[] = $visPagGrp;
         printTime('after uz' . $i . ' of pages details');
         $headerInfo[] = array('nb_pag' => $o_data->getContent('nb_pag'), 'nb_uniq_pag' => $o_data->getContent('nb_uniq_pag'), 'nb_max_pag' => $o_data->getContent('nb_max_pag'));
         //printDebug($headerInfo);
     }
     printTime('beg 2 of pages details');
     foreach ($a_all as $j => $all) {
         if (empty($categoryAsked)) {
             $a_infosDay[$j] = $all;
             $level = 0;
         } else {
             $categoryAsked = (string) $categoryAsked;
             //print("Zoom cate '$categoryAsked' <br>");
             //print($categoryAsked[2]);
             $detailsCategory = explode(">", $categoryAsked);
             //printDebug($detailsCategory);
             $level = sizeof($detailsCategory);
             //print("level : $level <br>");
             $array = $this->getPagesDetailsZoomArrayLevel($all, $level, $detailsCategory);
             $a_infosDay[$j] = $array;
         }
     }
     printTime('mid of pages details');
     // list asked category
     if ($level != 0) {
         $categoryAsked .= '>';
     }
     //		var_dump($categoryAsked);
     //		var_dump($a_infosDay[0]);
     $return = array();
     if (is_array($a_infosDay[0])) {
         //var_dump($a_infosDay[0]);
         foreach ($a_infosDay[0] as $currentId => $info) {
             // page or file or category, but not total
             if ($currentId != 'p_pmv_sum' && $currentId != 'f_pmv_sum') {
                 $id = '';
                 $parentId = '';
                 $data = '';
                 $sum = 0;
                 $sumN1 = 0;
                 $sumN2 = 0;
                 $percentN1 = 0;
                 $percentN2 = 0;
                 $type = '';
                 $entry = 0;
                 $sumtime = 0;
                 $exit = 0;
                 $singlepage = 0;
                 $a_vars = array();
                 // category
                 if (substr($currentId, 0, 1) === 'c') {
                     $type = 'category';
                     $entry = @$info['p_pmv_sum'][ARRAY_INDEX_ENTRYPAGE];
                     $exit = @$info['p_pmv_sum'][ARRAY_INDEX_EXITPAGE];
                     $sum = @$info['p_pmv_sum'][ARRAY_INDEX_COUNT] + @$info['f_pmv_sum'][ARRAY_INDEX_COUNT];
                     $sumtime = @$info['p_pmv_sum'][ARRAY_INDEX_TIME_TOTAL];
                     $singlepage = @$info['p_pmv_sum'][ARRAY_INDEX_PAGES_VISIT_ONEPAGE];
                     $allInfoInGroup = $this->getPagesDetailsZoomArrayLevel($a_infosDay[0], 1, array($currentId));
                     //var_dump($allInfoInGroup);exit;
                     //$a_vars = $this->getVarIdToName($a_infosDay[0]['p_pmv_sum'][ARRAY_INDEX_VARS]);
//.........这里部分代码省略.........
开发者ID:ber5ien,项目名称:www.jade-palace.co.uk,代码行数:101,代码来源:DataModel.class.php


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