Example #1
0
 function CreateCacheSet(LOGGROUP $grp = NULL, MASK $mask = NULL)
 {
     $grp = $this->CheckGroup($grp);
     if (!($grp->gid < 0)) {
         if (strcmp($grp->gid, VIRTUALReader::COMPLEX_ID) && strcmp($grp->gid, VIRTUALReader::SRCTREE_ID)) {
             return parent::CreateCacheSet($grp, $mask);
         }
     }
     if (!$mask) {
         $mask = $this->CreateMask($grp);
     }
     /*
         Old method
         $reqlist = $this->srctree->GetRequests($mask);
     */
     $reqlist = $this->srctree->GetRequests($mask, array($this, "CastProps"));
     return $this->req->CreateCacheSet($reqlist);
 }
Example #2
0
 function PrepareData(READER $reader, MASK $mask = NULL, INTERVAL &$iv = NULL, $need_items = false)
 {
     $axes = $this->reader->CreateAxes();
     $group = $reader->CreateGroup();
     $caches = $reader->CreateCacheSet($group, $mask);
     $iv = $this->PrepareInterval($reader, $group, $caches, $iv);
     $cfg = $this->GetAgregatingProperties($caches, $iv);
     $flags = ($this->interpolate_gaps ? 0 : CACHE::REPORT_EMPTY) | ($this->show_gaps == DRAW::SHOW_GAPS ? CACHE::MISSING_INFO : 0);
     $data = array();
     foreach ($caches as $key => $cache) {
         $info = $this->PrepareGroupData($cache, $iv, $axes, $cfg, $flags, $need_items);
         if (!$this->CheckGroupData($info)) {
             continue;
         }
         $data[] = $info;
     }
     $spec = $this->CreateGraphSpec($this->reader, $axes, $iv, $data, $cfg);
     $this->CheckData($reader, $group, $iv, $caches, $data, $spec);
     return array($axes, &$data, &$spec);
 }