34include_once
'./webservice/soap/classes/class.ilXMLResultSetColumn.php';
35include_once
'./webservice/soap/classes/class.ilXMLResultSetRow.php';
43 if (is_numeric($index) && ($index < 0 || $index > count($this->colspecs)))
57 $this->colspecs [count($this->colspecs)] =
new ilXMLResultSetColumn (count($this->colspecs), $columnname);
68 foreach ($this->colspecs as $colspec) {
69 if (strcasecmp($columnname, $colspec->getName()) == 0)
114 $this->rows [] =
$row;
148 foreach ($array as
$row) {
152 $columnNames = array_keys(
$row);
153 foreach ($columnNames as $columnName)
160 $xmlRow->setValues (
$row);
170 $this->rows = array();
171 $this->colspecs = array();
180 return count($this->colspecs);
189 return count($this->rows);
199 throw new Exception (
"Index too small or too big!");
200 return $this->rows[$idx];
213 if (!is_numeric($colIdx))
216 return $row->getValue ($colIdx);
An exception for terminatinating execution or to throw for unit testing.
hasColumn($columnname)
has column name
addRow(&$row)
add row object
getValue($rowIdx, $colIdx)
return column value at colidx and rowidx
getRowCount()
return row count
clear()
Clear resultset (colspecs and row values)
getRow($idx)
return row for index idx
getColumnCount()
return column count
getRows()
return array of ilXMLResultSetRow
setArray($array)
Clear table value and sets them based on array.
addColumn($columnname)
create a new column with columnname and attach it to column list
addArray($array, $overwrite=false)
Add table values.
getColSpecs()
return array of ilXMLResultSetColumn
getIndexForColumn($columnname)
return index for column name