response.class.php
public function getRawAggregate($returnType)
  {
    if ($returnType == DOC_TYPE_ARRAY) {
      $res = array();
      foreach ($this->_aggregate as $key => $value) {
        if ($value) {
          $tmp = CPS_Response::simpleXmlToArray($value);
          // multiple or one result - returned data format should be the same!
          if (isset($tmp['data'][0])) {
            // multiple results
            $res[$key] = $tmp['data'];
          } else {
            // one result
            $res[$key][] = $tmp['data'];
          }
          unset($tmp);
        } else {
          $res[$key] = array();
        }
      }
      return $res;
    } else if ($returnType == DOC_TYPE_STDCLASS) {
      $res = array();
      foreach ($this->_aggregate as $key => $value) {
        if ($value) {
          $tmp = CPS_Response::simpleXmlToStdClass($value);
          $res[$key] = $tmp->data;
          unset($tmp);
        } else {
          $res[$key] = new stdClass();
        }
      }
      return $res;
    }
    return $this->_aggregate;
  }
public function getRawAggregate($returnType)
  {
    if ($returnType == DOC_TYPE_ARRAY) {
      $res = array();
      foreach ($this->_aggregate as $key => $value) {
        if ($value) {
          $tmp = CPS_Response::simpleXmlToArray($value);
          // multiple or one result - returned data format should be the same!
          if (isset($tmp['data'][0])) {
            // multiple results
            $res[$key] = $tmp['data'];
          } else {
            // one result
            $res[$key][] = $tmp['data'];
          }
          unset($tmp);
        } else {
          $res[$key] = array();
        }
      }
      return $res;
    } else if ($returnType == DOC_TYPE_STDCLASS) {
      $res = array();
      foreach ($this->_aggregate as $key => $value) {
        if ($value) {
          $tmp = CPS_Response::simpleXmlToStdClass($value);
          $res[$key] = $tmp->data;
          unset($tmp);
        } else {
          $res[$key] = new stdClass();
        }
      }
      return $res;
    }
    return $this->_aggregate;
  }
public function getRawAggregate ( $ returnType ) { if ( $ returnType == DOC_TYPE_ARRAY ) { $ res = array ( ) ; foreach ( $ this -> _aggregate as $ key => $ value ) { if ( $ value ) { $ tmp = CPS_Response :: simpleXmlToArray ( $ value ) ; // multiple or one result - returned data format should be the same! if ( isset ( $ tmp [ 'data' ] [ 0 ] ) ) { // multiple results $ res [ $ key ] = $ tmp [ 'data' ] ; } else { // one result $ res [ $ key ] [ ] = $ tmp [ 'data' ] ; } unset ( $ tmp ) ; } else { $ res [ $ key ] = array ( ) ; } } return $ res ; } else if ( $ returnType == DOC_TYPE_STDCLASS ) { $ res = array ( ) ; foreach ( $ this -> _aggregate as $ key => $ value ) { if ( $ value ) { $ tmp = CPS_Response :: simpleXmlToStdClass ( $ value ) ; $ res [ $ key ] = $ tmp -> data ; unset ( $ tmp ) ; } else { $ res [ $ key ] = new stdClass ( ) ; } } return $ res ; } return $ this -> _aggregate ; }
Returns the aggregate data from the response
@return array
Returns the aggregate data from the response