예제 #1
0
파일: api.php 프로젝트: nilBora/konstruktor
 protected function calculateValue()
 {
     if (strlen($this->parsed) > 1 && $this->parsed[0] == '=') {
         $expr = substr($this->parsed, 1);
         $subcell = new SpreadSheetCell($this->connection, $this->sheetid, $expr, $this->prefix, $this->db_type);
         if ($subcell->isIncorrect() === false) {
             $expr = $subcell->getCalculatedValue();
         } else {
             $expr = $this->replaceCells($expr);
             $math = new Math();
             $expr = $math->calculate($expr);
         }
         $this->calc = $expr;
     } else {
         $this->calc = $this->parsed;
     }
 }
예제 #2
0
 public function isCell($coord)
 {
     $cell = new SpreadSheetCell($this->connection, $this->sheetid, $coord, $this->prefix);
     if ($cell->isIncorrect()) {
         return false;
     }
     return $cell;
 }