Пример #1
0
 /**
  * Process a table's row
  *
  * @param PHPFIT_Parse $rows
  */
 public function doRows($rows)
 {
     try {
         // bind the first row (heads) to function and properties
         $this->bind($rows->parts);
         $results = $this->query();
         if (!is_array($results)) {
             throw new Exception(get_class($this) . "::query() returned an empty list");
         }
         $this->match($this->buildArrayFromParser($rows->more), $results, 0);
         $last = $rows->last();
         $last->more = $this->buildRows($this->surplus);
         $this->markParse($last->more, 'surplus');
         $this->markArray($this->missing, 'missing');
     } catch (Exception $e) {
         $this->exception($rows->leaf(), $e);
     }
 }
Пример #2
0
 /**
  * @return PHPFIT_Parse
  */
 public function leaf()
 {
     return $this->parts == null ? $this : $this->parts->leaf();
 }