34 include_once
'./webservice/soap/classes/class.ilXMLResultSetColumn.php';
35 include_once
'./webservice/soap/classes/class.ilXMLResultSetRow.php';
44 if (is_numeric(
$index) && ($index < 0 || $index > count($this->colspecs))) {
57 $this->colspecs [count($this->colspecs)] =
new ilXMLResultSetColumn(count($this->colspecs), $columnname);
69 foreach ($this->colspecs as $colspec) {
70 if (strcasecmp($columnname, $colspec->getName()) == 0) {
117 $this->rows [] =
$row;
147 public function addArray($array, $overwrite =
false)
152 foreach ($array as
$row) {
155 $columnNames = array_keys($row);
156 foreach ($columnNames as $columnName) {
162 $xmlRow->setValues($row);
173 $this->rows = array();
174 $this->colspecs = array();
184 return count($this->colspecs);
194 return count($this->rows);
205 throw new Exception(
"Index too small or too big!");
207 return $this->rows[$idx];
221 if (!is_numeric($colIdx)) {
225 return $row->getValue($colIdx);
addRow(&$row)
add row object
setArray($array)
Clear table value and sets them based on array.
getValue($rowIdx, $colIdx)
return column value at colidx and rowidx
clear()
Clear resultset (colspecs and row values)
getColumnCount()
return column count
getColSpecs()
return array of ilXMLResultSetColumn
addArray($array, $overwrite=false)
Add table values.
getRow($idx)
return row for index idx
hasColumn($columnname)
has column name
getRowCount()
return row count
addColumn($columnname)
create a new column with columnname and attach it to column list
getIndexForColumn($columnname)
return index for column name
getRows()
return array of ilXMLResultSetRow