Example #1
0
 function doRead()
 {
     if ($this->cache) {
         $read = new WGEntity\IORead();
         $result = unserialize($read->process('', $this->file . '.serial', 'rb'));
     } else {
         $read = new WGEntity\IOReadWebGrind();
         $result = $read->process('', $this->file, 'rb');
         $write = new WGEntity\IOWrite();
         $write->process(serialize($result), $this->file . '.serial', 'wb');
     }
     return $result;
 }
 function doRead()
 {
     if ($this->cache) {
         $read = new Entity\IORead();
         $result = unserialize($read->process('', $this->file . '.serial', 'rb'));
     } else {
         $read = new IORead();
         $result = $read->process('', $this->file, 'rb');
     }
     $this->headers = NULL;
     $this->result = $result;
     $this->headers = $this->getHeaders();
     $this->functions = $this->getFunctions();
     $this->costFormat = empty($this->costFormat) ? WG\Config::$defaultCostFormat : $this->costFormat;
     return $result;
 }