コード例 #1
0
 public function prune(&$maxsize, &$maxdepth, &$log)
 {
     if ($maxsize >= $this->getSize()) {
         $maxsize = $maxsize - $this->getSize();
         return $this;
     } elseif ($maxsize <= 0) {
         $log[] = $this->getQueryString();
         $result = new ThingDescription();
     } else {
         $result = new ClassDescription(array_slice($this->m_diWikiPages, 0, $maxsize));
         $rest = new ClassDescription(array_slice($this->m_diWikiPages, $maxsize));
         $log[] = $rest->getQueryString();
         $maxsize = 0;
     }
     $result->setPrintRequests($this->getPrintRequests());
     return $result;
 }