mirror of
https://github.com/dg/dibi.git
synced 2025-08-03 20:57:36 +02:00
sorting [WIP]
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user