Example #1
0
 /**
  * Treats a <statistic> node and its children <where><column> and <model><data> nodes
  *
  * @param  SimpleXmlElement $statistic
  * @return object                         with ->_tbl set properly.
  */
 public function processQuery_statistic($statistic)
 {
     $result = null;
     //	$classname	=	get_class( $this );
     //	$addXmlSql	=	new $classname( $this->_db, $this->_table );
     $addXmlSql = new self($this->_db, $this->_table, $this->_pluginParams);
     $addXmlSql->tableAs = $this->tableAs;
     // <statistic><where> ...
     $additionalWhere = $statistic->getElementByPath('where');
     $addXmlSql->process_where($additionalWhere);
     // <statistic><model> ...
     $model = $statistic->getElementByPath('model');
     if ($model) {
         $addXmlSql->process_data($model);
         $result = $this->queryObjectMergedXmlSql($addXmlSql);
     }
     return $result;
 }