mirror of
https://github.com/dg/dibi.git
synced 2025-08-08 23:26:49 +02:00
added DibiRow::toArray() & Countable
This commit is contained in:
@@ -398,7 +398,7 @@ class DibiResult extends DibiObject implements IDataSource
|
||||
|
||||
} elseif ($as === '=') { // "record" node
|
||||
if ($x === NULL) {
|
||||
$x = (array) $row;
|
||||
$x = $row->toArray();
|
||||
$x = & $x[ $assoc[$i+1] ];
|
||||
$x = NULL; // prepare child node
|
||||
} else {
|
||||
@@ -422,7 +422,7 @@ class DibiResult extends DibiObject implements IDataSource
|
||||
|
||||
if ($x === NULL) { // build leaf
|
||||
if ($leaf === '=') {
|
||||
$x = (array) $row;
|
||||
$x = $row->toArray();
|
||||
} else {
|
||||
$x = $row;
|
||||
}
|
||||
@@ -457,7 +457,7 @@ class DibiResult extends DibiObject implements IDataSource
|
||||
}
|
||||
|
||||
// autodetect
|
||||
$tmp = array_keys((array) $row);
|
||||
$tmp = array_keys($row->toArray());
|
||||
$key = $tmp[0];
|
||||
if (count($row) < 2) { // indexed-array
|
||||
do {
|
||||
|
Reference in New Issue
Block a user