1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-03 20:57:36 +02:00

sorting [WIP]

This commit is contained in:
David Grudl
2022-12-20 19:04:31 +01:00
parent 124d52139c
commit 09a974ed7a

View File

@@ -532,6 +532,7 @@ class Connection implements IConnection
public function addObjectTranslator(string $class, callable $translator): self
{
$this->translators[$class] = $translator;
uksort($this->translators, fn($a, $b) => class_exists($a, false) && is_subclass_of($a, $b) ? -1 : 1);
return $this;
}