- Fixed SQLite truncate, added AdapterProxy autoloading

This commit is contained in:
Dave Mc Nicoll committed 2025-05-12 15:11:00 +00:00
1 parent 1ec582d1ac
commit 761e0401b0
7 files changed
+105 -6

No files matched your search

+14 -1
View File
@@ -343,7 +343,20 @@ class EntityCollection extends \ArrayObject implements \JsonSerializable {
$list[] = $entity instanceof \JsonSerializable ? $entity->jsonSerialize() : $entity->toArray($includeRelations);
}
return $list;
return $this->utf8ize($list, "UTF-8", "UTF-8");
}
protected function utf8ize(mixed $content) {
if (is_array($content)) {
foreach ($content as $key => $value) {
$content[$key] = $this->utf8ize($value);
}
}
elseif (is_string($content)) {
return mb_convert_encoding($content, "UTF-8", "UTF-8");
}
return $content;
}
public function fromArray(array $datasets, ? string /*stringable*/ $entityClass = null) : self