diff --git a/Model/SqlResultCollection.php b/Model/SqlResultCollection.php index 3157b8c..50a96f8 100644 --- a/Model/SqlResultCollection.php +++ b/Model/SqlResultCollection.php @@ -1,6 +1,8 @@ items); return $sql_result_provider->assoc($field, $assoc_as_array); } + + /** + * Get the collection of items as a plain array. + * + * @return array + */ + public function toArray() + { + return array_map(function($value) + { + return $value instanceof ArrayableInterface ? $value->toArray() : $value; + + }, $this->items); + } } \ No newline at end of file